Make changes to resnet18

I want to use resnet18. According to the documentation, she receives an image 224x224x3 in size at the entrance. My semple has a size of 224x3x3. I want to add a linear (3x224) layer to the resnet18 input to get semple (224x224). Help me change def forward.

class MyResNet(ResNet):
    def __init__(self):
        super(MyResNet, self).__init__(BasicBlock, [2, 2, 2, 2], num_classes=3)
        self.myfc1 = nn.Linear(3, 224)
        self.conv1 = torch.nn.Conv2d(1, 64, 
            kernel_size=(7, 7), 
            stride=(2, 2), 
            padding=(3, 3), bias=False)

Interestingly, if I upload to a resnet sample of size 224x3, there is no error. Why is that? The resnet network itself converts my semples