Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fine-tune in R: end-to-end example and some troubles #5149

Closed
statist-bhfz opened this issue Feb 25, 2017 · 3 comments
Closed

Fine-tune in R: end-to-end example and some troubles #5149

statist-bhfz opened this issue Feb 25, 2017 · 3 comments
Labels

Comments

@statist-bhfz
Copy link
Contributor

statist-bhfz commented Feb 25, 2017

Hi,

I asked about fine-tune in R (#4817), and due to jeremiedb`s answers I finally was able to write complete R example: Dogs vs. Cats classification with mxnet and R. Please add this link to the list of tutorials (http://mxnet.io/tutorials/index.html and/or https://github.com/dmlc/mxnet/tree/master/example).

During this work I faced with new trouble. Unfortunately, all resnet models from http://data.dmlc.ml/models/imagenet/ completely failed after beginning of the training with some kind of memory allocation error. nvidia-smi utility shows that all memory (4Gb) is used even for batch_size = 1.

Then I tried inception-bn. It works fine, but my R session crashed after each iteration and checkpoint save.

I also noticed that iterators uses almost all available RAM and swap immediately after creating. Is it normal behavior?

@matt32106
Copy link

I worked on the same project. I have not tested all models but i am able to run the inception-bn-28-small model without memory issues with batch size 512 (i used symbol_inception-bn-28-small.R in the image-classification directory). I'll give a try to the resnet examples.

Maybe you should make a pull request for your example code (to go into example/image-classification), it is useful for R users.

@statist-bhfz
Copy link
Contributor Author

Yes, inception-bn-28-small works good, but only with small images (my post (in Russian) about it). For images like 224x224 it is necessary to use another networks.

I'm not going to make pull request according to http://mxnet.io/community/contribute.html:

If you have blog posts about MXNet or tutorials that use MXNet, please tell us and we’ll add a link to them in the examples on GitHub.

Maybe I can add small vignette about fine-tune itself (without preprocessing steps) to https://github.com/dmlc/mxnet/tree/master/R-package/vignettes

@thirdwing
Copy link
Contributor

@statist-bhfz A PR will be truly welcome.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants