dlaicourse
dlaicourse copied to clipboard
Type Error: Python Notebook Course 1 - Part 2 - Lesson 2
A type error is found while defining model. Following is the error:
TypeError: The added layer must be an instance of class Layer.
Code:
model = tf.keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])])
Python: 3.6.5 Numpy: 1.16.1 Tensorflow: 1.12.0 Keras: 2.2.4
Try again after updating Tensorflow and Keras.