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

Understanding time difference in finetunning vs freeze and train #50

Closed
miguelgfierro opened this issue Dec 5, 2017 · 4 comments
Closed

Comments

@miguelgfierro
Copy link
Owner

Posted in pytorch forum: https://discuss.pytorch.org/t/understanding-time-difference-between-finetuning-and-training-the-last-layer-with-frozen-weights/10796

@miguelgfierro
Copy link
Owner Author

Using CNTK with simpsons dataset:
freeze:
Test accuracy is 0.763938618926
Process time 621.0402624607086 seconds

finetune:
Test accuracy is 0.959335038363
Process time 1635.1398813724518 seconds

@miguelgfierro
Copy link
Owner Author

miguelgfierro commented Dec 20, 2017

Using Simpsons dataset (20k images)

ResNet18 on 1GPU finetune:
Training complete in 21m 37s
Best val Acc: 0.953708

ResNet18 on 1GPU freeze:
Training complete in 8m 30s
Best val Acc: 0.692327

ResNet18 on 4GPU finetune:
Training complete in 10m 11s
Best val Acc: 0.954220

ResNet18 on 4GPU freeze:
Training complete in 9m 42s
Best val Acc: 0.686957

ResNet152 on 4GPU finetune:
Training complete in 64m 55s
Best val Acc: 0.987468

ResNet152 on 4GPU freeze:
Training complete in 59m 18s
Best val Acc: 0.727110

@miguelgfierro
Copy link
Owner Author

There is a big overload when doing Dataparallel.

In words of one of the developers:

At the moment, DataParallel broadcasts parameters that are not modified, and has some other overhead around replicate and broadcast_coalesce. We are in the process to improve it. See some progress here: pytorch/pytorch#4216.

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

1 participant