enas icon indicating copy to clipboard operation
enas copied to clipboard

How to transfer to the larger data, like 300*300?

Open marsggbo opened this issue 6 years ago • 10 comments

marsggbo avatar Nov 20 '18 04:11 marsggbo

I tried to use ENAS to design architecture on my dataset which is much larger than CIFAR10. If I set the image size to 224*224, then raise ValueError("GraphDef cannot be larger than 2GB."). Is it possible to use placeholder to solve this problem and does anyone succeed? Thanks.

marsggbo avatar Nov 20 '18 04:11 marsggbo

For classification architecture search the repository loads all CIFAR10 data to the memory. This is OK for small datasets, but for larger ones its a problem - thus the error you get. You need to change the data input pipeline to tf.data to be able to run larger datasets. See: https://www.tensorflow.org/guide/datasets

Nadav1 avatar Nov 20 '18 09:11 Nadav1

@Nadav1 Thank you so much. I've solved the problem and put the code in marsggbo/enas. But now I have another question, i.e. how to use multiple GPUs. Because the code of ENAS is so complex to me, there are many components, such as controller, child models. So I don't know how to sync the gradients of each GPUs, and I'm not sure whether I need to train controller in parallel. Looking forward to your suggestion. Thanks!

marsggbo avatar Nov 26 '18 03:11 marsggbo

@marsggbo I downloaded your code provided above and tried to run it again for cifar10 dataset before running code for my own dataset for which I was getting the ValueError("GraphDef cannot be larger than 2GB.") with original ENAS. For cifar 10 dataset I am getting loss value as nan. screenshot from 2018-12-20 13-31-43

ManasiPat avatar Dec 20 '18 08:12 ManasiPat

@ManasiPat Did you modify the code in *sh file. You may need to assign--output_classes=10 instead of 5.

marsggbo avatar Dec 20 '18 08:12 marsggbo

@marsggbo Thanks. I changed that, now I am not getting nan however I am getting my training accuracy to be 0 , 2, or 1 screenshot from 2018-12-20 14-02-45

ManasiPat avatar Dec 20 '18 08:12 ManasiPat

ok got it. Its number of correct samples out of the batch. Let me run it for a while to see if I get the results as in the original paper. Thanks.

ManasiPat avatar Dec 20 '18 08:12 ManasiPat

@marsggbo I am working on age prediction using facial images. Treating it as a classification problem, where I have 101 classes. So, to feed my dataset, I have changed the data_utils file and changed the output_classes=101 and data_path to point at my dataset in the script file. It should work with my data right? Or do I need to make any other changes? I have 1,37,480 training images and 17,186 for validation and testing.

ManasiPat avatar Dec 20 '18 09:12 ManasiPat

@marsggbo I ran the modified code for cifar-10, however it doesn't reproduce the results which we get without the modifications. How you tried runing your code for cifar-10 to see if you can reproduce the results?

ManasiPat avatar Dec 26 '18 11:12 ManasiPat

@ManasiPat Hi, I'm also working on age prediction using facial images. Do you success with ENAS?

tobymu avatar Apr 11 '19 09:04 tobymu