Skip to content

Issue coming while fitting the model #343

Answered by scjm
AbiGopal1 asked this question in Q&A
Discussion options

You must be logged in to vote

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)
])

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by mrdbourke
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants