How to modify the input channels of a Resnet model

(Sjt Uzhanglj) #1

I’m new to Pytorch.
I want to input a 4-channel tensor into a Resnet model, but the channel numbers of default input is 4.
Any one teach me how to realize this modification, please?


Hi, if you’re still interested:

I’m currently trying it now to make it use for medical images that may have 18 slices thus 18 channels of grayscale images.


I’m facing the same problem. Does it work?

(Pierre) #4

I want a 2-channel resnet, is it possible with resnet18() for instance? and How?