Question about the interface to ResNet in torchvision.
I’m trying to create a ResNet with LayerNorm (or GroupNorm) instead of BatchNorm. There’s a parameter called norm_layer that seems like it should do this: resnet18(num_classes=output_dim, norm_layer=nn.LayerNorm)
But this throws an error,
RuntimeError('Given normalized_shape=[64], expected input with shape [*, 64], but got input of size[128, 64, 14, 14]')
about the shapes being wrong. Is this deprecated? Or am I using the interface wrong? What is the recommended way to do this?