I am not following here. I thought the final output of one hot encoding is a matrix not a row. In other words, you give the the row input like [0 1 2 3 0 2 1], and you wish to have a matrix output.
my code is one_hot = tf.reshape( tf.one_hot(label, depth, axis=0), depth) give a row here, but passes all tests… but again, it gives me error in the
I guess this is not one of the Machine Learning Specialization assignment, which specialization is it? i suggest you to move your thread to the right category, because it is better for mentors who have access to the assignment in question to answer your question. To move your thread, click the edit button (pencil icon) at the lower right corner of the first post in this thread. If you can’t move it, let us know so I or other mentors can help.