In the one_hot_matrix assignment, my test cases are passing with the below equation,
one_hot = tf.reshape(tf.one_hot(label, depth, axis=0), depth)
but this error shows up for y_train and y_test,
In the one_hot_matrix assignment, my test cases are passing with the below equation,
one_hot = tf.reshape(tf.one_hot(label, depth, axis=0), depth)
but this error shows up for y_train and y_test,
This problem is solved by passing a tuple of depth into it.
Thanks
sorry, can you show your answer to this problem with an image? I have this problem too, but I can’t fix it.
We need to pass the shape as (depth, ) so the shape of the returned vector is of rank-1
thank you so much for your response.