How to add a fake parameter to a Pyro model

Hello,

I noticed that when I apply torch.parameters() to myPyroModel, the resulting generator myPyroModel.parameters() actually has no content.

Is it possible to add a fake parameter into the generator myPyroModel.parameters()?
If yes, how can I add a fake parameter into myPyroModel.parameters()?

Thank you,

Hi @h56cho, I’m not sure why you would need a fake parameter, but you could add

myPyroModel.fake_parameter = torch.nn.Parameter(torch.tensor(0.))