The patch_first_conv function looks to have a potential bug in the following for-loop because i can be larger than new_weight.shape[1] (= new_in_channels // module.groups) when groups > 1.
for i in range(new_in_channels):
new_weight[:, i] = weight[:, i % default_in_channels]
This may not be a problem with the currently supported models, but I think it would be good to correct this.
The
patch_first_conv
function looks to have a potential bug in the following for-loop becausei
can be larger thannew_weight.shape[1]
(=new_in_channels // module.groups
) when groups > 1.This may not be a problem with the currently supported models, but I think it would be good to correct this.