Hi!
I have been stuck on this problem for a while and eventually found out a solution, so here it is:
All test passed in the definition of the function, but I got an error running this cell:
new_y_test = y_test.map(one_hot_matrix)
new_y_train = y_train.map(one_hot_matrix)
ValueError: Shape must be rank 1 but is rank 0 for ‘{{node Reshape}} = Reshape[T=DT_INT32, Tshape=DT_INT32](Reshape/tensor, Reshape/shape)’ with input shapes: [], [].
The instruction suggests using tf.reshape to reshape the tensor. Using instead np.reshape fixed my problem, I hope it won’t impact the rest of the assignment.
Any other ideas why tf.reshape doesn’t work? Is it just a typo in the instructions or is there really a problem in my code that is making this error pop up?