IntelLabs / bayesian-torch

A library for Bayesian neural network layers and uncertainty estimation in Deep Learning extending the core of PyTorch
BSD 3-Clause "New" or "Revised" License
544 stars 73 forks source link

conv_transpose2d parameter order problem #13

Closed pierreosselin closed 2 years ago

pierreosselin commented 2 years ago

https://github.com/IntelLabs/bayesian-torch/blob/f6f516e9b3721466aa0036c735475a421cc3ce80/bayesian_torch/layers/variational_layers/conv_variational.py#L784-L786

image

When I try to convert a deterministic autoencoder into a bayesian one with a ConvTranspose2d layer I get the error "Exception has occurred: TypeError conv_transpose2d(): argument 'groups' (position 7) must be int, not tuple" which I suspect comes from self.dilation and self.group which are swaped.

ranganathkrishnan commented 2 years ago

@pierreosselin can you check how you are getting model output in your code? If return_kl flag is True (by default), the forward function returns a tuple (output and kl) - https://github.com/IntelLabs/bayesian-torch/blob/f6f516e9b3721466aa0036c735475a421cc3ce80/bayesian_torch/layers/variational_layers/conv_variational.py#L793

ranganathkrishnan commented 2 years ago

closing the issue due to no response from the user.

SoyedTuhinAhmed commented 2 years ago

I am having the same issue and return_kl flag is False

rameshamurtaza commented 1 year ago

I am having the same Issue, pls suggest what can be wrong