Variable is deprecated since 0.4. Are you using <0.4 versions?
In order to add those tensors to model paramters you need to use register_parameter method or assign a nn.Parameter rather than tensor.
I don’t really know how Variables used to work.
Sanity check is to verify those variables are listed as model parameters since if they aren’t, you will never pass them to optimizer–> no learning