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

训练轮数问题 #53

Open
1701000429 opened this issue May 12, 2022 · 1 comment
Open

训练轮数问题 #53

1701000429 opened this issue May 12, 2022 · 1 comment

Comments

@1701000429
Copy link

step=10000 这个好像不是轮数的意思。每轮是只读取一个batch吗,代码风格和torch官方的train_one_epoch不太一样。
请问 训练轮数=step*batch/训练集张数 吗?

@pkuCactus
Copy link
Owner

感谢你对我们工作的关注,当时由于GPU资源的限制batchsize不管设置过大,因此为了产生类似batchsize=10的效果,设置了一个每个epoch内的循环迭代,在这个循环类梯度是累加并且不回传,只有当达到batchsize大小的时候梯度回传并且置零。

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

No branches or pull requests

2 participants