-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
多gpu下训练的model在单gpu下测试出错 #94
Comments
save weights的时候用单GPU的model去save。 |
请问您是怎么设置的呢,我现在用了博主的源代码,并没有改动什么,发现训练起来,并没有用到gpu,请问您知道怎么解决吗 @evanfly |
@evanfly 参考你给的网址多GPU训练还是不对,报错 |
在 model = Model(inputs=[input, labels, input_length, label_length], outputs=loss_out) 后面加上model = multi_gpu_model(model, 8)就行了,多gpu训练保存模型,然后重新写个脚本先load再保存就行了。 reload(densenet) |
@evanfly 谢谢,已经解决 |
在8个gpu下训练的densenet-model,在单gpu下测试,出现错误,You are trying to load a weight file containing 1 layers into a model with 55 layers ,如果在加载model的时候改成basemodel.load_weights(modelPath,by_name=True),有结果输出,但结果错的离谱,网上也都没有找到解决方案。
训练代码中加了model = multi_gpu_model(model, 8)
The text was updated successfully, but these errors were encountered: