As mentioned ResNet50 require an input image of size 224x224x3. So either you an input image of same size[224x224x3] or create an architecture similar to ResNet which accepts an input image of size 28x28x1 by changing size of input layer.
Hope it helps.