Skip to content

NASNet Model #321

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

Open
ahkarami opened this issue Nov 3, 2017 · 15 comments
Open

NASNet Model #321

ahkarami opened this issue Nov 3, 2017 · 15 comments

Comments

@ahkarami
Copy link

ahkarami commented Nov 3, 2017

Recently the Google Brain Team released a fantastic CNN model, NASNet, in TF-slim, which achieved the state-of-the-art Top-1 Accuracy on ImageNet by 82.7 %. I want to know that the PyTorch team has any plan for implement or porting this model into the PyTorch Offifcial Models (i.e., torchvision models)?

@alykhantejani
Copy link
Contributor

Hi @ahkarami,

In torchvision we would like to have models that have been trained in pytorch using pytorch + torchvision so that they are also reproducible by the community. If somebody from the community would like to train these networks, we would be more than willing to accept a PR + the weights

@Cadene
Copy link

Cadene commented Nov 4, 2017

@alykhantejani and InceptionV3 is an exception :P

@soumith
Copy link
Member

soumith commented Nov 6, 2017

@Cadene indeed it's an exception because we could never train Inceptionv3 to the same accuracy as google's paper in my few attempts.

@Cadene by any chance do you have a NASNet definition already? I can kick-off training if so...

@Cadene
Copy link

Cadene commented Nov 6, 2017 via email

@aussetg
Copy link

aussetg commented Nov 7, 2017

@Cadene, how far are you? I was going to start porting Tensorflow Slim's model definition as the paper alone is... light in crucial details and parameters to say the least. Don't want to uselessly duplicate efforts :)

@Cadene
Copy link

Cadene commented Nov 7, 2017

@aussetg I can't focus on it too much because of some deadlines, but I am definitely working on it.
To give you an idea, I loaded the model on TensorBoard and I am currently porting the first two blocks (CellStem0 and CellStem1).

@Cadene
Copy link

Cadene commented Nov 9, 2017

@soumith @aussetg I did not port the pretrained parameters yet to validate the model, but at least you can run a forward + backward pass on this version.
https://github.com/Cadene/pretrained-models.pytorch/blob/master/pretrainedmodels/nasnet.py

@aussetg
Copy link

aussetg commented Nov 9, 2017

@Cadene You implemented the separable convolution using Conv2d(in=out=groups) + pointwise, while it won't work on the release version wouldn't it be better to make use of pytorch/pytorch#3057 ? i.e merge Conv2d(in, in, in) + pointwise(n) with conv2d(in, in*n, in)

@Cadene
Copy link

Cadene commented Nov 9, 2017

@aussetg It makes sense. I just added a global variable to switch between the two implementations. Cadene/pretrained-models.pytorch@99deb0e

@soumith
Copy link
Member

soumith commented Nov 9, 2017

new release coming this week, so feel free to switch to that suggestion by @aussetg

@Cadene
Copy link

Cadene commented Nov 16, 2017

NASNet-A-Large has been successfully ported to pytorch! https://github.com/Cadene/pretrained-models.pytorch

However, the forward pass is a bit slow. During the evaluation:

  • 3 seconds per batch of 50 images with the old version of pytorch on a GTX 1070
  • 1.5 seconds per batch with the last version of pytorch from master (cudnn v7 and cuda 8)

@fmassa
Copy link
Member

fmassa commented Nov 16, 2017

@Cadene awesome! Do you have an idea on how fast it runs on TensorFlow?
I would expect it to be slower in PyTorch because of the padding difference in TF, but I'm curious to know how much slower it is.

@Kulikovpavel
Copy link

Can you add NASNet medium?
According to this, it is best accuracy/complexity network

image3

@fmassa
Copy link
Member

fmassa commented Dec 17, 2018

Sure, NasNet (medium) sounds like a good addition as well

@Cadene
Copy link

Cadene commented Dec 18, 2018

@Kulikovpavel Hi, did you see any available pretrained model for NASNet medium somewhere? Did not find any in tensorflow/slim directory :/

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

No branches or pull requests

7 participants