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

training speed #1

Closed
zhanglaplace opened this issue Nov 25, 2019 · 8 comments
Closed

training speed #1

zhanglaplace opened this issue Nov 25, 2019 · 8 comments

Comments

@zhanglaplace
Copy link

你好,你这个版本的迭代速度大概是什么样子的。之前训练的感觉数据处理比较慢~

@oukohou
Copy link
Owner

oukohou commented Nov 25, 2019

@zhanglaplace 你说的迭代速度是指训练时的速度吗?具体时间我记不清了,不过在参数:

batch_size = 50
input_size = 64
num_epochs = 90
learning_rate = 0.001 # originally 0.001
weight_decay = 1e-4 # originally 1e-4
augment = False
optimizer_ft = optim.Adam(params_to_update, lr=learning_rate, weight_decay=weight_decay)
criterion = nn.MSELoss()
lr_scheduler = optim.lr_scheduler.StepLR(optimizer_ft, step_size=30, gamma=0.1)

下,单1080Ti大概2~3个小时完成训练。

@zhanglaplace
Copy link
Author

@oukohou 那感觉还挺快的,2分钟一个epoch.没记错训练数据大概是4w左右。

@oukohou
Copy link
Owner

oukohou commented Nov 26, 2019

@zhanglaplace 补充一个,可能取决于你的内存大小哈,我是32G。
个人揣测,数据缓存到内存之后,会省去很多读盘的时间。

@zhanglaplace
Copy link
Author

@oukohou 看了下迭代速度,我用的是mxnet的代码,速度卡在数据预处理上了。也就是数据在内存后的处理部分了

@zhanglaplace
Copy link
Author

@oukohou 训练的过程loss很容易非常大
1、mseLoss 训练loss基本都可以到1000-2000
2、L1Loss loss在7左右 ,但是CA_3和CA_5比较低。(直接从头训练)
image

@oukohou
Copy link
Owner

oukohou commented Dec 2, 2019

@zhanglaplace As I mentioned in the Readme:

And also: Batchsize could severely affect the results.

If you read the linked address, you will know why.

P.S. A pretraining might be necessary.

@bulingda
Copy link

bulingda commented Dec 3, 2019

请问这个代码可以跑通吗?

@oukohou
Copy link
Owner

oukohou commented Dec 4, 2019

@bulingda Certainly... why can't?

@oukohou oukohou closed this as completed Dec 11, 2019
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

3 participants