title: How to convert a Keras1 trained model into Keras2
body: <p>I trained a model using Keras1.
  When I use try to load it using Keras2</p>
  
  <pre><code>model = load_model('my_model.h5')
  </code></pre>
  
  <p>I am getting this error message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 232, in load_model
      model = model_from_config(model_config, custom_objects=custom_objects)
    File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 293, in model_from_config
      return layer_module.deserialize(config, custom_objects=custom_objects)
    File "/usr/local/lib/python2.7/dist-packages/keras/layers/__init__.py", line 46, in deserialize
      printable_module_name='layer')
    File "/usr/local/lib/python2.7/dist-packages/keras/utils/generic_utils.py", line 140, in deserialize_keras_object
      list(custom_objects.items())))
    File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 2374, in from_config
      process_layer(layer_data)
    File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 2343, in process_layer
      custom_objects=custom_objects)
    File "/usr/local/lib/python2.7/dist-packages/keras/layers/__init__.py", line 46, in deserialize
      printable_module_name='layer')
    File "/usr/local/lib/python2.7/dist-packages/keras/utils/generic_utils.py", line 141, in deserialize_keras_object
      return cls.from_config(config['config'])
    File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 1206, in from_config
      return cls(**config)
  TypeError: __init__() got an unexpected keyword argument 'input_dtype'
  </code></pre>
  
  <p>This model works on my machine that still has Keras1 installed.
  Is there a way to convert the model to Keras2? Or must I train it anew for my Keras2 running machine?</p>