You could try to use e.g. rawpy to open the RAW images without transforming them into a particular (lossy) image format.
The error is raised since your conv layer expects an input image with 4 channels, while your input has 3 channels.
I guess you might expect the image files to have an additional alpha channel?
If that’s the case you should take a look at the image loading and processing and make sure this channel is also loaded.
Alternatively, change in_channels to 3 in the conv layer if you want to work with your current input tensors.