Why do we have to squeeze our predictions? #114
ashikshafi08
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The reason is pretty straightforward, our
y_test
is of the shape (10, ) whereas oury_preds
the shape is (10, 1).Using
tf.squeeze()
will get rid of the extra 1 dimension in our tensor, for us,y_preds
have an extra dimension so we get rid of it.We do this because while calculating evaluation metrics we gotta make sure both
y_preds
andy_test
should be in the same shape.Hope it helps.
Beta Was this translation helpful? Give feedback.
All reactions