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

SqueezeNet model with functional API #14

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

SqueezeNet model with functional API #14

wants to merge 6 commits into from

Conversation

rcmalli
Copy link

@rcmalli rcmalli commented Oct 14, 2016

  • Squeezenet has very small footprint ( 5.1 MB model file ).
  • It has AlexNet accuracy.
  • Feedforward prediction time is near 5 FPS with CPU (2.4 GHz Intel Core i5).
  • This project contains both Tensorflow and Theano weights ported from Caffe weights.
  • Weights are placed in model folder at keras-squeezenet repository.
  • Code is rewritten and follows the rules of other model codes in keras/applications.

TO-DO

  • Links for the model files should be fixed according to release version of this library (look at squeezenet.py).

Reference:

Keras Project Reference:

Original Project Reference:

added python file and explanations to readme file
image path changed
added cite info
Copy link
Owner

@fchollet fchollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the PR! A few minor comments.


- [Original Squeezenet](https://github.com/DeepScale/SqueezeNet)

'''
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring should come at the top of the file.

'''

TH_WEIGHTS_PATH = 'PATH/squeezenet_weights_th_dim_ordering_th_kernels.h5'
TF_WEIGHTS_PATH = 'PATH/squeezenet_weights_tf_dim_ordering_tf_kernels.h5'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where can the weights be downloaded?


def SqueezeNet(nb_classes, finetune=False, input_tensor=None, weights=None):
'''Instantiate the SqueezeNet architecture,
optionally loading weights pre-trained
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation issue?

return x


def SqueezeNet(nb_classes, finetune=False, input_tensor=None, weights=None):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't weights default to "imagenet"?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general: please match the same constructor arguments as every other image classification model in the repo / in keras.applications: (include_top=True, weights='imagenet', input_tensor=None)

general API fixes and documentation fixes
Download links for both Tensorflow and Theano backends are added.
@rcmalli
Copy link
Author

rcmalli commented Oct 15, 2016

  • Docstring placement and indentation are fixed.
  • Download links for weights are added.
  • Function arguments are changed.

@fchollet
Copy link
Owner

Sorry for the delay. I do intend on merging this, I just have limited bandwidth.

@soupault
Copy link

soupault commented Feb 3, 2017

@rcmalli do you think if it would be a good idea to add also head-less versions of the architecture (see, e.g. ResNet50) so to ease the potential usage in transfer learning?

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

Successfully merging this pull request may close these issues.

3 participants