My current code structure is to create a Static InferenceEngine instance.
And then, In a for-loop:
I initiate several variables with: Variable.Bernoulli(n).Named("xxx") as "Prior".
Then I set soft evidence with: Variable.ConstrainEqualRandom
Finally, I do the infer with engine.infer()
In this approach, I come across a memory leak issue where I observed memory usage increase over iterations.
Am I using it correctly? Is there any solution to this one?