JamesYang007 / autoppl

C++ template library for probabilistic programming
https://jamesyang007.github.io/autoppl/
MIT License
45 stars 5 forks source link

Remove re-evaluation for constraint parameters #49

Open JamesYang007 opened 4 years ago

JamesYang007 commented 4 years ago

Currently the constraint parameters require re-evaluation for each reference to a parameter. This is because backward-evaluation may depend on the forward-evaluation results during AD for each of the expression nodes that make up the parameters. The only way to avoid this is to make references to the entire expression for the parameters. The problem is where to store the first instance of these expressions..