Tensorflow introduction exercise week 3

Hello.
I am geting long error in test and train set mapping part of one hot enoding section. Pl guide me what am I missing. Here are attached ss of the error.





The shape parameter to tf.reshape should be a tuple like (dim, ) and not an integer.

Can you please elaboate?

What Balaji is saying is that the “reshape” operation that you wrote in your one_hot_matrix function is incorrect, but the test cases for that function did not catch your error. You can find lots of threads about this in the search history on Discourse. Here’s one. Here’s another.