Code Monkey home page Code Monkey logo

Comments (3)

ZichaoHuang avatar ZichaoHuang commented on June 3, 2024

n_generator是生成数据时用到的最大进程数;n_rank_calculator是evaluation的时候算排名时用到的最大进程数,ckpt_dir是保存checkpoint文件的路径

from transe.

pingcx avatar pingcx commented on June 3, 2024

非常感谢您的回复!

我还有一些问题想问您,因为网上查一些关于multiprocessing的资料没弄清楚

我想弄清楚model.py文件中的launch_training函数中的三个循环的执行顺序以及它们中间运行的结果
for _ in range(self.n_generator),

for raw_batch in self.kg.next_raw_batch(self.batch_size),

for _ in range(self.n_generator)

,或者说为什么您这样写可以保证代码的有效执行,我可以参考什么资料并找到吗?

谢谢

from transe.

ZichaoHuang avatar ZichaoHuang commented on June 3, 2024

这个repo用到的多进程模型是最简单的生产者-消费者模型,你可以参考一下

from transe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.