title: How to reduce size of keras saved model?
body: <p>Then I'm building models on base of pretrained models from tf-hub or keras.applications (I'm using the same convolutional core) size of the resulting model file(s) size after model.save() or tf.saved_model.save is about 10 Mb. After I'm trained it model size increased to 30Mb!</p>
  
  <p>If I save the model after training, recreate the model again and load weights from the trained model it will predict as expected and have file(s) size about 10Mb.</p>
  
  <p>Code I'm using to create model.</p>
  
  <pre class="lang-py prettyprint-override"><code>MODULE_HANDLE = 'https://tfhub.dev/google/imagenet/mobilenet_v2_100_224/feature_vector/4'
  model = tf.keras.Sequential([
      hub.KerasLayer(MODULE_HANDLE, trainable=True),    
      tf.keras.layers.Dense(train_gen.num_classes, activation='softmax')
      ])
  model.build((None,)+IMAGE_SIZE)
  </code></pre>
  
  <p>I expect that this is related to saving training information, such as the optimizer state. So, is there the right way to save the model for inference, without that save-recreate-load_weights trick?</p>