You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a custom messenger guide that subclasses AutoMessenger. I took inspiration from the existing messenger guides and use deep_setattr(self, name, PyroParam(...)) to create learnable parameters. I have now tried using my model/guide pair with local param mode (with pyro.settings.context(module_local_params=True):, and it throws a
NotImplementedError: Support for global pyro.param statements in PyroModules with local param mode enabled is not yet implemented.
The exception is coming from the model. Debugging it a bit, it looks like all the learnable parameters are saved in the _pyro_context of the model and not the guide. I believe that might be because:
guide enters its context, global param store updates its content to the guide's local parameters
guide calls model. Model enters its context, global param store updates its content to the model's local parameters
Sample statements in the model get intercepted by get_posterior, which creates the PyroParams
but the model's context is currently active, so the params are saved in the model
The text was updated successfully, but these errors were encountered:
I have a custom messenger guide that subclasses
AutoMessenger
. I took inspiration from the existing messenger guides and usedeep_setattr(self, name, PyroParam(...))
to create learnable parameters. I have now tried using my model/guide pair with local param mode (with pyro.settings.context(module_local_params=True):
, and it throws aThe exception is coming from the model. Debugging it a bit, it looks like all the learnable parameters are saved in the
_pyro_context
of the model and not the guide. I believe that might be because:get_posterior
, which creates the PyroParamsThe text was updated successfully, but these errors were encountered: