Why do you unsqueeze dimension 1 for test data? The error reported says the input should be of size [b, 3, w, h], but yours is [3, 1, 224, 224], so it does not accept it. Try to use transpose to change the first two dimensions.