Michael_Hutchinson:

This is something that will work in Tensorflow, as the graphs are static there.


Well yeah, but TF will do the computation over and over again.
So what you would do in PyTorch is to wrap parameter, transformation of the parameter and distribution in a nn.Module and use that.
A long while ago, I thought that blurring the boundary between nn.Modules and nn.Parameters was a good idea, I still think it would be, but obviously it doesn’t seem to be immediately pending.
Best regards
Thomas