Course 02 Week 3 ; use tf.one_hot error,

Despite using it,still getting error;

AssertionError                            Traceback (most recent call last)
<ipython-input-44-01a42bf0964d> in <module>
     14     print("\033[92mAll test passed")
     15 
---> 16 one_hot_matrix_test(one_hot_matrix)

<ipython-input-44-01a42bf0964d> in one_hot_matrix_test(target)
      5     print("Test 1:",result)
      6     assert result.shape[0] == depth, "Use the parameter depth"
----> 7     assert np.allclose(result, [0., 1. ,0., 0.] ), "Wrong output. Use tf.one_hot"
      8     label_2 = [2]
      9     result = target(label_2, depth)

AssertionError: Wrong output. Use tf.one_hot

Hi @wepu,

As you can see in the instructions, you have to use two specific functions together for this exercise. From the error you are getting, my guess is you only used tf.reshape

Best,
Mubsi

P.S it would be helpful next time that you mention the exercise number you are having trouble with along with the error trace, so that it becomes easier for the mentors to locate where you are having trouble.

Used the tf.one_hot still getting the error

You have to use both of those functions.

Can I email you the notebook in it I have used both?

Found solution had used wrong shape argument for tf.reshape