We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TransUNet/networks/vit_seg_modeling_resnet_skip.py)
When I tried to add the 4th channel but it throws me this error:
RuntimeError: Given groups=1, weight of size [64, 3, 7, 7], expected input[2, 4, 256, 256] to have 3 channels, but got 4 channels instead
The text was updated successfully, but these errors were encountered:
I got the solution to it. I just have to change 3 to 4 in:
`class ResNetV2(nn.Module): """Implementation of Pre-activation (v2) ResNet mode."""
def __init__(self, block_units, width_factor): super().__init__() width = int(64 * width_factor) self.width = width self.root = nn.Sequential(OrderedDict([ ('conv', StdConv2d(4, width, kernel_size=7, stride=2, bias=False, padding=3)), ('gn', nn.GroupNorm(32, width, eps=1e-6)), ('relu', nn.ReLU(inplace=True)), # ('pool', nn.MaxPool2d(kernel_size=3, stride=2, padding=0)) ]))`
Sorry, something went wrong.
No branches or pull requests
TransUNet/networks/vit_seg_modeling_resnet_skip.py)
When I tried to add the 4th channel but it throws me this error:
RuntimeError: Given groups=1, weight of size [64, 3, 7, 7], expected input[2, 4, 256, 256] to have 3 channels, but got 4 channels instead
The text was updated successfully, but these errors were encountered: