You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to try arch = 'tresnet_m_miil_in21k' encoder = create_encoder(arch, pretrained=True, n_in=3)
But got this error Traceback (most recent call last): File "train_affectnet_simclr.py", line 58, in <module> model = create_simclr_model(encoder, hidden_size=2048, projection_size=128) File "/usr/local/lib/python3.7/dist-packages/self_supervised/vision/simclr.py", line 20, in create_simclr_model with torch.no_grad(): representation = encoder(torch.randn((2,n_in,128,128))) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/usr/local/lib/python3.7/dist-packages/timm/models/tresnet.py", line 274, in forward x = self.forward_features(x) File "/usr/local/lib/python3.7/dist-packages/timm/models/tresnet.py", line 268, in forward_features return self.body(x) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/container.py", line 139, in forward input = module(input) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/container.py", line 139, in forward input = module(input) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py", line 457, in forward return self._conv_forward(input, self.weight, self.bias) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py", line 454, in _conv_forward self.padding, self.dilation, self.groups) RuntimeError: Given groups=1, weight of size [64, 48, 3, 3], expected input[2, 768, 32, 32] to have 48 channels, but got 768 channels instead
The text was updated successfully, but these errors were encountered:
I wanted to try
arch = 'tresnet_m_miil_in21k' encoder = create_encoder(arch, pretrained=True, n_in=3)
But got this error
Traceback (most recent call last): File "train_affectnet_simclr.py", line 58, in <module> model = create_simclr_model(encoder, hidden_size=2048, projection_size=128) File "/usr/local/lib/python3.7/dist-packages/self_supervised/vision/simclr.py", line 20, in create_simclr_model with torch.no_grad(): representation = encoder(torch.randn((2,n_in,128,128))) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/usr/local/lib/python3.7/dist-packages/timm/models/tresnet.py", line 274, in forward x = self.forward_features(x) File "/usr/local/lib/python3.7/dist-packages/timm/models/tresnet.py", line 268, in forward_features return self.body(x) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/container.py", line 139, in forward input = module(input) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/container.py", line 139, in forward input = module(input) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py", line 457, in forward return self._conv_forward(input, self.weight, self.bias) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py", line 454, in _conv_forward self.padding, self.dilation, self.groups) RuntimeError: Given groups=1, weight of size [64, 48, 3, 3], expected input[2, 768, 32, 32] to have 48 channels, but got 768 channels instead
The text was updated successfully, but these errors were encountered: