How to use RGBA or 4 channel images in a DCGAN model in pytorch

Hi,
As you know, we can use only 1 and 3 channels in Keras, etc. But I just realized that
we can use the desired channels in Pytorch based on this link:

“You can write a custom dataset class for reading images and make them 16 channels input.
Check [link] for writing a custom dataset.”
But according to what you wrote here, finally “ImageFolder” converts the input to RGB channels?
def pil_loader(path: str) → Image.Image:
with open(path, “rb”) as f:
img = Image.open(f)
return img.convert(“RGB”)
Is that correct?