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

Cannot train model on multiple GPU #82

Open
cuongnc220592 opened this issue Jun 30, 2019 · 1 comment
Open

Cannot train model on multiple GPU #82

cuongnc220592 opened this issue Jun 30, 2019 · 1 comment

Comments

@cuongnc220592
Copy link

I have tried to use multi_gpu_model function to train on multiple GPU.
But when I edit the code as: training_model = multi_gpu_model(model, gpus=2), I got this error
The name "masks" is used 2 times in the model. All layer names should be unique.
I think it is caused from loss function
loss={
'regression' : keras_retinanet.losses.smooth_l1(),
'classification': keras_retinanet.losses.focal(),
'masks' : losses.mask(),
},
Do you have any suggestion to fix it ?
Thanks for your support

@hgaiser
Copy link
Contributor

hgaiser commented Jul 25, 2019

I've never tried to start a multi-gpu process with keras-maskrcnn. I do know that the keras implementation for multi-gpu is a bit weird and flawed, so don't expect great results..

That said, you could look at how we do it for keras-retinanet: https://github.com/fizyr/keras-retinanet/blob/master/keras_retinanet/bin/train.py

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