Open edebrouwer opened 3 years ago
Hi! Which matplotlib version are you using? If you're using a newer one, it seems like something's broke with the latest release of matplotlib (I actually wasn't able to even import the package past 3.3.4 😕 , was getting this error). Try using any matplotlib version <=3.3.4
, that seemed to work for me (see this google colab for a working example and the versions used). Specifically I tested 3.2.2
, 3.3.0
, and 3.3.4
and they all worked; while 3.4.0
and 3.4.2
did not.
That said, you've made me realize there was a separate unrelated bug in that example! Fixed it here https://github.com/brendanhasz/probflow/pull/65 Apparently torch doesn't like casting a torch tensor to a torch tensor (I think maybe it was cutting off the gradient propagation? But not sure tbh. But anyway the updated example works). So basically just make sure you have the x = torch.tensor(x)
line only in your top-level module (which in that example is the DenseRegression
class).
Thanks for letting me know about the error and hope that helps! 😄
Hi, while trying to run the example of dense regression for fully connected NN, I run into an issue when I try to sample from the posterior of the model. I use exactly the commands as shown in the documentation.
My backend is pytorch,
Thank you so much !