Skip to content

value error #77

May 25, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

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 😄

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@devilsmind-gif
Comment options

Answer selected by mrdbourke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants