You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have seen PR #85, however as far as I understand it replaces pretrained weights with new initialization. I have a 1 dim images and was wondering what can I do to benefit from pretrained weights while using single channel images.
Any ideas?
The text was updated successfully, but these errors were encountered:
If you pass in_channels=1 and pretrained=True, it will load the pretrained weights correctly (and replace the first layer with random initialization. You might then want to freeze all but the first layer and train the network (i.e. just the first layer) to convergence. That make sense?
Yeah it does, thanks.
And wouldn't it be a good idea to instead of initializing it with random numbers to use start from the filters for e.g. red channel (or a mean of three channels)? As far as I understand it the first channel is mostly about detecting simple edges so maybe it would help the model if it started from weights that actually already to that (of course for different domain but maybe still better then starting "from scratch")?
Yes, I agree that starting with the channelwise mean is probably better than starting from random (though it shouldn't really make a difference if you then train that layer to convergence with a reasonable number of single-channel images).
Closing this -- feel free to reopen if you have any more questions / issues.
I have seen PR #85, however as far as I understand it replaces pretrained weights with new initialization. I have a 1 dim images and was wondering what can I do to benefit from pretrained weights while using single channel images.
Any ideas?
The text was updated successfully, but these errors were encountered: