Inception v3 in TensorFlow
Note
You can follow along with the code in the Jupyter notebook ch-12c_InceptionV3_TensorFlow
.
TensorFlow's Inception v3 is trained on 1,001 labels instead of 1,000. Also, the images used for training are pre-processed differently. We showed the preprocessing code in previous sections. Let us dive directly into restoring the Inception v3 model using TensorFlow.
Let us download the checkpoint file for the Inception v3:
# load the inception V3 model model_name='inception_v3' model_url='http://download.tensorflow.org/models/' model_files=['inception_v3_2016_08_28.tar.gz'] model_home=os.path.join(models_root,model_name) dsu.download_dataset(source_url=model_url, source_files=model_files, dest_dir = model_home, force=False, extract=True)
Define the common imports for inception module and variables:
### define common imports and variables from tensorflow.contrib.slim.nets import inception image_height=inception.inception_v3.default_image_size image_width...