JonasGeiping / data-poisoning

Implementations of data poisoning attacks against neural networks and related defenses.
MIT License
65 stars 9 forks source link

Issue with Channel Mismatch in MNIST Dataset Using Your Code #3

Open vv-ch opened 3 months ago

vv-ch commented 3 months ago

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?