IntelLabs / bayesian-torch

A library for Bayesian neural network layers and uncertainty estimation in Deep Learning extending the core of PyTorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in trans_conv2d when model is reparametrized

rameshamurtaza opened this issue · comments

conv_transpose2d(): argument 'groups' (position 7) must be int, not tuple

I used this command to convert my model to bnn (const_bnn_prior_parameters) and now getting this error

I believe I found the error. In line 812 of bayesian_torch/layers/variational_layers/conv_variational.py the F.conv_transpose2d function is being called as:

out = F.conv_transpose2d(input, weight, bias, self.stride,
                                 self.padding, self.output_padding,
                                 self.dilation, self.groups)

i.e. the order is dilation then groups, whereas as seen in https://pytorch.org/docs/stable/generated/torch.nn.functional.conv_transpose2d.html , the order should be groups then dilation:

out = F.conv_transpose2d(input, weight, bias, self.stride,
                                 self.padding, self.output_padding,
                                 self.groups, self.dilation)

Fixed. commit 97ba16a