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

[Question] about nasnet-a used as subnetwork in adanet #56

Open
tianxh1212 opened this issue Jan 5, 2019 · 5 comments
Open

[Question] about nasnet-a used as subnetwork in adanet #56

tianxh1212 opened this issue Jan 5, 2019 · 5 comments

Comments

@tianxh1212
Copy link

@cweill
hi,Weill,
I saw an article on the Google ai blog:https://ai.googleblog.com/2018/10/introducing-adanet-fast-and-flexible.html
The article mentions using nasnet-a as subnetwork after 8 adanet iteration and get the error-rate of 2.3% on cifar-10
and with fewer parameters at the same time. I would like to ask two questions.
1.do you use the entire nasnet-a architecture network(for exapmle, N=6 and F=32) as subnetwork, or use the normal cell as subnetwork or something else.
2. how do the subnetworks combine to each other.

Thanks !

@cweill
Copy link
Contributor

cweill commented Jan 7, 2019

@tianxh1212 : With the following code and settings you should be able to get the same results: https://github.com/tensorflow/adanet/blob/master/adanet/examples/nasnet.py#L181

  • We used the N=6, F=32 in the config. A single subnetwork with those settings should have 3.3M parameters. Also I think we disabled use_aux_head.
  • We used the Estimator force_grow=True setting.
  • We used the SCALAR mixture weights, use_bias=False, max_iteration_steps=1000000 and all the other Estimator settings were at their defaults. So we simply took the average of the subnetworks' outputs at each iteration. We also ran for 10 iterations.

@Smallyolk2024
Copy link
Contributor

Smallyolk2024 commented Mar 14, 2019

@cweill
hi,Weill,
I got some errors, like this: ValueError:'generator' yielded an element of shape (1, ) where an element of shape () was expected
Note that:

  • the input data that I used is CIFAR-10 dataset, which was preprocessed and defined using input_fn like that in adanet/adanet/examples/tutorials/customizing_adanet.ipynb. For example:
    dataset = tf.data.Dataset.from_generator(generator(x_train, y_train), (tf.float32, tf.int32), ((32, 32, 3), ()))
  • What I used is tensorflow 1.12, python3.6

Solution:I resolve the above question by setting:

  • dataset = tf.data.Dataset.from_generator(generator(x_train, y_train), (tf.float32, tf.int32), ((32, 32, 3), 1))

@cweill
Copy link
Contributor

cweill commented Mar 15, 2019

@SmallyolkLiu: Have a look at our research code that uses NASNet in AdaNet. It shows you how you can get it working on Google Cloud MLE.

@tl-yang
Copy link

tl-yang commented Mar 28, 2019

Hi @cweill . Thanks for all the great work. Did you apply any data augmentation? In your research code, I see that you apply basic augmentation (flip + crop) to input images. Did you do the same to the performance reported in the blog? Thanks!

@cweill
Copy link
Contributor

cweill commented Mar 28, 2019

@tl-yang: Please see the details in our recent paper: https://arxiv.org/abs/1903.06236

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

4 participants