Skip to content

Commit

Permalink
Let image retraining use inception_v3 by default.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 189724287
  • Loading branch information
TensorFlow Hub Authors authored and andresusanopinto committed Mar 21, 2018
1 parent 6cdf685 commit 13fbd9d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/image_retraining/retrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
This example shows how to train an image classifier based on any
TensorFlow Hub module that computes image feature vectors. By default,
it uses the feature vectors computed by NASNet Large trained on ImageNet.
it uses the feature vectors computed by Inception V3 trained on ImageNet.
See https://github.com/tensorflow/hub/blob/master/docs/modules/image.md
for more options.
The top layer receives as input a 4032-dimensional vector (assuming
NASNet Large) for each image. We train a softmax layer on top of this
The top layer receives as input a 2048-dimensional vector (assuming
Inception V3) for each image. We train a softmax layer on top of this
representation. If the softmax layer contains N labels, this corresponds
to learning N + 4032*N model parameters for the biases and weights.
to learning N + 2048*N model parameters for the biases and weights.
Here's an example, which assumes you have a folder containing class-named
subfolders, each full of images for each label. The example folder flower_photos
Expand Down Expand Up @@ -57,7 +57,7 @@
program, for example the tensorflow/examples/label_image sample code.
By default this script will use the highly accurate, but comparatively large and
slow NASNet Large model architecture. It's recommended that you start with this
slow Inception V3 model architecture. It's recommended that you start with this
to validate that you have gathered good training data, but if you want to deploy
on resource-limited platforms, you can try the `--tfhub_module` flag with a
Mobilenet model. For more information on Mobilenet, see
Expand Down Expand Up @@ -1311,7 +1311,7 @@ def main(_):
'--tfhub_module',
type=str,
default=('https://storage.googleapis.com/tfhub-test-modules/'
'google/image/imagenet/nasnet_large/feature_vector/1.tar.gz'),
'google/image/imagenet/inception_v3/feature_vector/1.tar.gz'),
help="""\
Which TensorFlow Hub module to use.
See https://github.com/tensorflow/hub/blob/master/docs/modules/image.md
Expand Down

0 comments on commit 13fbd9d

Please sign in to comment.