I’m building CNN with custom loss function.
But it seems like weights of CNN is not updated.
At every iteration, CNN creates same prediction.
When I try to see grad values from,
print(predicted_image.grad) # Shows None
for param in my_net.parameters():
    print("param",param) # Shows tensor array filled with float numbers
    print("param.grad",param.grad) # Shows "None"
    print(param.grad.data.sum()) # Shows 'NoneType' object has no attribute 'data'

I can’t see grad values.
I can’t figure out what I falsely did even with searches.