-
I am getting the following error when trying to fit the model for the first time as follows ValueError: Exception encountered when calling layer "sequential_7" (type Sequential).
Please help in resolving this |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi AbiGopal1 - model = tf.keras.Sequential([ |
Beta Was this translation helpful? Give feedback.
-
Hi @AbiGopal1, What code are you writing to get this kind of issue? What section is it in? I think @scjm has a good answer above for something that'll solve your problem. Also, this answer may help you too: #278 |
Beta Was this translation helpful? Give feedback.
Hi AbiGopal1 -
If you add this line (see below for where it goes)
tf.keras.layers.Input(shape=(1,)),
Then the output knows the shape of the output it must return, doesn't have to try and infer it
Hope this helps
model = tf.keras.Sequential([
tf.keras.layers.Input(shape=(1,)),
tf.keras.layers.Dense(1)
])