Course 2 week 3 programming assignment the model shows error

This error comes and I can’t track the error in code.

No gradients provided for any variable: [‘Variable:0’, ‘Variable:0’, ‘Variable:0’, ‘Variable:0’, ‘Variable:0’, ‘Variable:0’].

Kindly help me out I am stuck.

I got the solution with a lot of help from @nramon
For the other learners getting a similar error it can be corrected by

  1. Reshaping the one_hot
  2. Using tensorflow to transpose and not numpy

Thank you for posting the summary, @Pragya_here.

Good luck with the rest of the specialization :slight_smile:

I encountered the same error. When I submit the assignment, the grader scores it 100/100.
I implemented one_hot_matrix( ) with tf.reshape( ) and now I got stuck on. What should I check more?

Hii! In cell 27 under compute_cost function are you using tensorflow for the transpose or numpy? You have to use tensorflow to transpose not numpy.

I got it. Thank you very much!