Nifrec:

my_module.my_parameter.grad


you’re calling the property getter here, my_module._my_parameter.grad would work (use single underscore to avoid name mangling, otherwise you parameter is only accessible as my_module._parameters[’_MyModule__my_parameter’])