Skip to content

Densenet not working for grayscale images

The densenet model fails when training datasets with grayscale images i.e. montgomery. Running mednet train -vv densenet montgomery gives the following message:

RuntimeError: Given groups=1, weight of size [64, 3, 7, 7], expected input[1, 1, 512, 512] to have 3 channels, but got 1 channels instead