When I switch to the MNIST dataset, I receive the following error during the training phase:
RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[128, 1, 28, 28] to have 3 channels, but got 1 channel instead
It appears that the ResNet model expects input with 3 channels, but the MNIST dataset has only 1 channel, leading to the mismatch.How should I resolve this issue?
When I switch to the MNIST dataset, I receive the following error during the training phase:
RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[128, 1, 28, 28] to have 3 channels, but got 1 channel instead
It appears that the ResNet model expects input with 3 channels, but the MNIST dataset has only 1 channel, leading to the mismatch.How should I resolve this issue?