Ghadjeres/DeepBach

Finish Keras 2 upgrade

Closed this issue · 2 comments

Some parts of the code were upgraded to the new API, but not completely. Let's finish that.

Warnings:

models_zoo.py:29: UserWarning: Update your `Dense` call to the Keras 2 API: `Dense(input_dim=172, name="embedding_left", units=200)`
  output_dim=num_dense, name='embedding_left')
models_zoo.py:31: UserWarning: Update your `Dense` call to the Keras 2 API: `Dense(input_dim=172, name="embedding_right", units=200)`
  output_dim=num_dense, name='embedding_right')
models_zoo.py:62: UserWarning: Update your `Model` call to the Keras 2 API: `Model(inputs=[<tf.Tenso..., outputs=Tensor("pi...)`
  output=pitch_prediction)
deepBach.py:687: UserWarning: The semantics of the Keras 2 argument  `steps_per_epoch` is not the same as the Keras 1 argument `samples_per_epoch`. `steps_per_epoch` is the number of batches to draw from the generator at each epoch. Update your method calls accordingly.
  validation_steps=validation_steps)
deepBach.py:687: UserWarning: Update your `fit_generator` call to the Keras 2 API: `fit_generator(<generator..., epochs=5, verbose=1, validation_data=<generator..., validation_steps=20, steps_per_epoch=500)`
  validation_steps=validation_steps)

That's a good idea. Sorry, I was a bit lazy when upgrading to Keras 2. Thanks

I can fix that. Actually a few days ago I was doing migration to Keras 2 on some project.