dlaicourse icon indicating copy to clipboard operation
dlaicourse copied to clipboard

Type Error: Python Notebook Course 1 - Part 2 - Lesson 2

Open hfurqan opened this issue 5 years ago • 1 comments

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

hfurqan avatar Mar 08 '19 17:03 hfurqan

Try again after updating Tensorflow and Keras.

emican avatar Oct 24 '20 19:10 emican