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
Encountered a code bug when replicating, specifically, the Vit model expected input channel is 2, but the input channel is 3, the source code missing the intermediate processing part? The following is the program error:
Traceback (most recent call last):
File "D:\PycharmProject\MEMix\main.py", line 239, in
run_training(cut_alpha=2.0, mix_alpha=1.0,num_classes=5)
File "D:\PycharmProject\MEMix\main.py", line 124, in run_training
ALL, attn, final = net_all(mix_flow, onset)
File "D:\Anaconda3\envs\Mers\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\Anaconda3\envs\Mers\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "D:\PycharmProject\MEMix\model.py", line 272, in forward
x = self.model(x,y) # [B,768]
File "D:\Anaconda3\envs\Mers\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\Anaconda3\envs\Mers\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "D:\PycharmProject\MEMix\model.py", line 201, in forward
x = self.forward_features(x,y)
File "D:\PycharmProject\MEMix\model.py", line 175, in forward_features
x = self.patch_embed(x)
File "D:\Anaconda3\envs\Mers\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\Anaconda3\envs\Mers\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "D:\Anaconda3\envs\Mers\lib\site-packages\timm\layers\patch_embed.py", line 131, in forward
x = self.proj(x)
File "D:\Anaconda3\envs\Mers\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\Anaconda3\envs\Mers\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "D:\Anaconda3\envs\Mers\lib\site-packages\torch\nn\modules\conv.py", line 460, in forward
return self._conv_forward(input, self.weight, self.bias)
File "D:\Anaconda3\envs\Mers\lib\site-packages\torch\nn\modules\conv.py", line 456, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [768, 2, 16, 16], expected input[34, 3, 224, 224] to have 2 channels, but got 3 channels instead
The text was updated successfully, but these errors were encountered:
Encountered a code bug when replicating, specifically, the Vit model expected input channel is 2, but the input channel is 3, the source code missing the intermediate processing part? The following is the program error:
The text was updated successfully, but these errors were encountered: