Getting error while compiling model error says output must be tensorflow layer not keras layer

Hello here is the full error :- Output tensors of a Functional model must be the output of a TensorFlow Layer (thus holding past layer metadata). Found: <keras.layers.core.dense.Dense object at 0x7c29e3522d70>


Thank you in advance for helping !

I got the solution, actually while defining dense layer for bounding box, i had only given tf.keras.layers.Dense(4, name=‘bounding_box’) instead of tf.keras.layers.Dense(units=4, name=‘bounding_box’)

2 Likes