Most likely there parameters are not properly registered and thus unknown to the optimizer.
You could try to use a nn.ModuleDict 46 instead, but you would need to wrap your parameters in a nn.Module, since plain nn.Parameters won’t be recognized as far as I know.
PS: Variables are deprecated since 0.4.0. Just use torch.tensor(..., requires_grad=True) instead.