brendanhasz / probflow

A Python package for building Bayesian models with TensorFlow or PyTorch
http://probflow.readthedocs.io
MIT License
171 stars 17 forks source link

Don't check_trace in torch.jit.trace_module #71

Open brendanhasz opened 2 years ago

brendanhasz commented 2 years ago

PyTorch started enforcing a check that the output of a traced function matches the output of the same function eagerly-executed. This will almost always fail in probflow applications, because most model's outputs will be different between two calls, because of the random posterior sampling.

To fix, we'll just set check_trace=False in torch.jit.trace_module.