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
When creating a model using timm.create_model(arch, pretrained=True, in_chans=1, num_classes=1), single-channel input images can be used with tf_efficientnet_b2_ns, but not efficientnet_b3_pruned. The pruned models result in the following error:
File "/home/james/miniconda3/envs/mammo/lib/python3.10/site-packages/timm/models/efficientnet.py", line 557, in forward
x = self.forward_features(x)
File "/home/james/miniconda3/envs/mammo/lib/python3.10/site-packages/timm/models/efficientnet.py", line 540, in forward_features
x = self.conv_stem(x)
File "/home/james/miniconda3/envs/mammo/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1482, in _call_impl
return forward_call(*args, **kwargs)
File "/home/james/miniconda3/envs/mammo/lib/python3.10/site-packages/timm/models/layers/conv2d_same.py", line 30, in forward
return conv2d_same(x, self.weight, self.bias, self.stride, self.padding, self.dilation, self.groups)
File "/home/james/miniconda3/envs/mammo/lib/python3.10/site-packages/timm/models/layers/conv2d_same.py", line 17, in conv2d_same
return F.conv2d(x, weight, bias, stride, (0, 0), dilation, groups)
RuntimeError: Given groups=1, weight of size [40, 3, 3, 3], expected input[14, 1, 2459, 2459] to have 3 channels, but got 1 channels instead
The text was updated successfully, but these errors were encountered:
When creating a model using
timm.create_model(arch, pretrained=True, in_chans=1, num_classes=1)
, single-channel input images can be used withtf_efficientnet_b2_ns
, but notefficientnet_b3_pruned
. The pruned models result in the following error:The text was updated successfully, but these errors were encountered: