value error #77
Answered
by
gauravreddy08
devilsmind-gif
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
gauravreddy08
May 25, 2021
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mrdbourke
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey Brother,
Seems like you have those Input Tensor shapes wrong, the input tensors you got are
X = [[-2, -1, 2, 4, 6]]
while the correct input should've been
X = [-2, -1, 2, 4, 6]
You see an extra pair of square brackets at the end right ? Thats what messing your models input_shape.
Explanation:
Having an extra pair of brackets actually changes the shape of the tensor. For example, input_shape for :
X = [[-2, -1, 2, 4, 6]]
is (1, 5)X = [-2, -1, 2, 4, 6]
is (5,)Fix :
Create those input tensors as follow
So fix those tensors and try running the model again. If you're still confused on how to fix those tensors, you can reach back to this thread anytime.
Happy Coding 😄