Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------------------------------------------------------
- TypeError Traceback (most recent call last)
- /tmp/ipykernel_27/3575863457.py in <module>
- 2 decoder = Decoder().to(device)
- 3 test_img = torch.unsqueeze(train_data[0], dim=0)
- ----> 4 print(encoder(test_img))
- /opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
- 1108 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
- 1109 or _global_forward_hooks or _global_forward_pre_hooks):
- -> 1110 return forward_call(*input, **kwargs)
- 1111 # Do not call functions when jit is used
- 1112 full_backward_hooks, non_full_backward_hooks = [], []
- /tmp/ipykernel_27/3812226487.py in forward(self, x)
- 33 )
- 34 def forward(self, x):
- ---> 35 x = self.encoder_cnn(x)
- 36 x = self.flat(x)
- 37 x = self.encoder_fc(x)
- /opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
- 1108 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
- 1109 or _global_forward_hooks or _global_forward_pre_hooks):
- -> 1110 return forward_call(*input, **kwargs)
- 1111 # Do not call functions when jit is used
- 1112 full_backward_hooks, non_full_backward_hooks = [], []
- /opt/conda/lib/python3.7/site-packages/torch/nn/modules/container.py in forward(self, input)
- 139 def forward(self, input):
- 140 for module in self:
- --> 141 input = module(input)
- 142 return input
- 143
- /opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
- 1108 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
- 1109 or _global_forward_hooks or _global_forward_pre_hooks):
- -> 1110 return forward_call(*input, **kwargs)
- 1111 # Do not call functions when jit is used
- 1112 full_backward_hooks, non_full_backward_hooks = [], []
- /opt/conda/lib/python3.7/site-packages/torch/nn/modules/conv.py in forward(self, input)
- 445
- 446 def forward(self, input: Tensor) -> Tensor:
- --> 447 return self._conv_forward(input, self.weight, self.bias)
- 448
- 449 class Conv3d(_ConvNd):
- /opt/conda/lib/python3.7/site-packages/torch/nn/modules/conv.py in _conv_forward(self, input, weight, bias)
- 442 _pair(0), self.dilation, self.groups)
- 443 return F.conv2d(input, weight, bias, self.stride,
- --> 444 self.padding, self.dilation, self.groups)
- 445
- 446 def forward(self, input: Tensor) -> Tensor:
- TypeError: conv2d() received an invalid combination of arguments - got (tuple, Parameter, Parameter, tuple, tuple, tuple, int), but expected one of:
- * (Tensor input, Tensor weight, Tensor bias, tuple of ints stride, tuple of ints padding, tuple of ints dilation, int groups)
- didn't match because some of the arguments have invalid types: (!tuple!, !Parameter!, !Parameter!, !tuple!, !tuple!, !tuple!, int)
- * (Tensor input, Tensor weight, Tensor bias, tuple of ints stride, str padding, tuple of ints dilation, int groups)
- didn't match because some of the arguments have invalid types: (!tuple!, !Parameter!, !Parameter!, !tuple!, !tuple!, !tuple!, int)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement