Open laurauzcategui opened 4 years ago
When running into Course 1 - Part 4 - Lesson 2 - Notebook with Tensorflow 2.0, ran into an issue with compile method when setting up the optimizer.
I think fix would be appropriate by setting the string instead of the tf.train.Adam
Error I ran into:
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-17-3863a6d90e8a> in <module> ----> 1 model.compile(optimizer = tf.train.Adam(), 2 loss = 'sparse_categorical_crossentropy', 3 metrics=['accuracy']) 4 5 model.fit(training_images, training_labels, epochs=5) AttributeError: module 'tensorflow_core._api.v2.train' has no attribute 'Adam'
@lmoroney , I'll open a PR for this :)
You should use optimizer='adam', instead tf.train.Adam()
When running into Course 1 - Part 4 - Lesson 2 - Notebook with Tensorflow 2.0, ran into an issue with compile method when setting up the optimizer.
I think fix would be appropriate by setting the string instead of the tf.train.Adam
Error I ran into:
@lmoroney , I'll open a PR for this :)