models.transforms.grayscale_to_rgb does not work properly with nih_cxr14
Previously, nih-cxr14 samples were converted to RGB through PIL when used during training with multi-label densenet, which worked without any problems (afaik).
The new custom grayscale_to_rgb() does not work with nih-cxr14 due to dataset consisting of 8-bit and 32-bit .PNG samples. The following error will be thrown when these images are sampled during training:
"TypeError: Input image tensor should have 1 or 3 planes,but found 4"
Examples of such 32-bit images that raise the TypeError: images/00000004_000.png, images/00000058_000.png.