title: How do you add new categories and training to a pretrained Inception v3 model in TensorFlow?
body: <p>I'm trying to utilize a pre-trained model like Inception v3 (trained on the 2012 ImageNet data set) and expand it in several missing categories.</p>
  
  <p>I have TensorFlow built from source with CUDA on Ubuntu 14.04, and the examples like transfer learning on flowers are working great.  However, the flowers example strips away the final layer and removes all 1,000 existing categories, which means it can now identify 5 species of flowers, but can no longer identify pandas, for example.  <a href="https://www.tensorflow.org/versions/r0.8/how_tos/image_retraining/index.html" rel="noreferrer">https://www.tensorflow.org/versions/r0.8/how_tos/image_retraining/index.html</a></p>
  
  <p>How can I add the 5 flower categories to the existing 1,000 categories from ImageNet (and add training for those 5 new flower categories) so that I have 1,005 categories that a test image can be classified as?  In other words, be able to identify both those pandas and sunflowers?</p>
  
  <p>I understand one option would be to download the entire ImageNet training set and the flowers example set and to train from scratch, but given my current computing power, it would take a very long time, and wouldn't allow me to add, say, 100 more categories down the line.</p>
  
  <p>One idea I had was to set the parameter <code>fine_tune</code> to <code>false</code> when retraining with the 5 flower categories so that the final layer is not stripped: <a href="https://github.com/tensorflow/models/blob/master/inception/README.md#how-to-retrain-a-trained-model-on-the-flowers-data" rel="noreferrer">https://github.com/tensorflow/models/blob/master/inception/README.md#how-to-retrain-a-trained-model-on-the-flowers-data</a> , but I'm not sure how to proceed, and not sure if that would even result in a valid model with 1,005 categories.  Thanks for your thoughts.</p>