Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

对Pytorch 添加多卡训练支持 #55

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

cyy53589
Copy link

修改说明

修改1

module.forward() 返回值维度第一个最好是batch

也就是说

batch = module.forwad().shape(0)

在计算ctc_loss 的时候再改回来。

不然多卡训练会失败,如果要使用DataParallel就必须这样做

修改2. 添加DataDistributed支持

文件ctc_pytorch_multigpu.py。 在这里我修改了

#为了识别小写字母
characters = "-" + string.digits + string.ascii_letters

…orward().shape(0) is batch_size otherwise it's difficult to change code for multipgpu
在forward() 里面,LSTM之前的shape跟作者保持一致,不然训练不出来。
@smith-kyle
Copy link

I'm a little late to the party, but I noticed you all aren't using a notebook review tool and wanted to invite you to review this pull request with GitNotebooks: https://gitnotebooks.com/ypwhs/captcha_break/pull/55

It lets you do things like comment on rendered markdown and code cells, so might be an easy win for your PR reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants