THUNLP-MT / THUMT

An open-source neural machine translation toolkit developed by Tsinghua Natural Language Processing Group
BSD 3-Clause "New" or "Revised" License
703 stars 197 forks source link

cache的作用 #38

Closed PromptExpert closed 6 years ago

PromptExpert commented 6 years ago

你好,

请问cache的作用是什么?cache通过update_cycle调节,为什么updata_cycle从1调到4后每步的训练时间变长了(大约四倍)?

Glaceon31 commented 6 years ago

你好。update_cycle的主要作用是在单GPU的环境下模拟多GPU的训练。例如在单GPU下设置update_cycle为4的话,相当于每4个batch才会更新一次参数,效果等同于4块GPU训练/4倍batchsize,因此需要的训练时间也会变长。

PromptExpert commented 6 years ago

明白了,谢谢