self.register_parameter should work fine and you can verify that this parameter is trained by checking its gradients after the backward pass via model.param_name.grad. If this attribute doesn’t return None than gradients are calculated the the parameter. Assuming you’ve also passed this parameter to an optimizer via e.g. optimizer = torch.optim.Adam(model.parameters(), lr=1e-3) then it’ll also be trained in the optimizer.step() call. You could additionally verify it by comparing its values before and after the step() call.