Disable PyroParam gradients

I am trying to disable the gradients of a PyroParam variable. I tried passing a torch tensor with requires_grads set to False. But when I use ELBO-based SVI (Trace_ELBO), the PyroParam variable gets updated during training. Does Trace_ELBO change all the variables to become trainable, or am I missing something else? I would appreciate any comment or help on the matter.

if you want to turn off gradients to particular parameters you should either take control of optimization yourself (see here) or use MixedMultiOptimizer

Sweet that answers my question. Thank you :smiling_face: