DLS Course 2 week 3

On exercise 3, I pass all the test cases, but the next cells bring up an error:

I have not added any code apart from what I was told in initializing the one-hot encoding variable

1 Like

That probably means you specified the shape on the reshape in one_hot_matrix as a scalar. It needs to be a 1D Tensor as in

shape = (depth,)

Unfortunately just passing the unit test for one_hot_matrix does not mean your code is fully correct.

2 Likes

Great. That was my mistake. Thank you!