Open laurauzcategui opened 4 years ago
Fix for Update for Adam optimizer compatibility on TF 2.0
https://github.com/lmoroney/dlaicourse/issues/46
Updated:
model.compile(optimizer = tf.train.Adam(), loss = 'sparse_categorical_crossentropy', metrics=['accuracy'])
to be:
model.compile(optimizer = 'adam', loss = 'sparse_categorical_crossentropy', metrics=['accuracy'])
to fix compatibility issues with TF 2.0
Yet, another more elegant solution could be the convert to: tf.keras.optimizers.Adam()
tf.keras.optimizers.Adam()
I'm happy to update it, if you prefer @lmoroney 😄
Fix for Update for Adam optimizer compatibility on TF 2.0
https://github.com/lmoroney/dlaicourse/issues/46
Updated:
to be:
to fix compatibility issues with TF 2.0