We gain the ability to memoize distribution construction in #111. However, now we need to manually call infer whenever we update the parameters of the underlying energy model. Instead, could we set up a structure where the InferenceLayer knows when the model variables have been changed, and automatically calls infer when another method is called?
We gain the ability to memoize distribution construction in #111. However, now we need to manually call
infer
whenever we update the parameters of the underlying energy model. Instead, could we set up a structure where theInferenceLayer
knows when the model variables have been changed, and automatically callsinfer
when another method is called?