Compile error Week1 HW 2

I am getting following error
“The added layer must be an instance of class Layer. Found: tf.Tensor”
Could anyone please guide me what did I do wrong?

Hey @reeshi80 ,

can you specify which course you are working on?

courser 4, convolutional NN

I haven’t checked this course yet, but I will ask mentors for the course for help :slightly_smiling_face:

Hi reeshi80,

The error message indicates that you are adding a tensor, rather than a layer. This may be due to adding what you think is a layer but what in fact is an application of a layer to a tensor, which produces a tensor. Try adding a layer without applying the layer to a tensor.

1 Like