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.

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

- Reshaping the one_hot
- Using tensorflow to transpose and not numpy

2 Likes

Hi.

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!