Conv2d replacement for linear in case larger images than trained model

Hi guys, what is the best way to use conv2d replacement for linear in case larger images than trained model?

answering own question: