Skip layer connections from the second layer
zhou-rui1 opened this issue · comments
Hi, when I try to edit the unet to unet++, it seems that the horizontal connections are only added from the second layer, and the last output layer is up-sampled by one layer to restore the dimensions, which is not the same as the original model.
is this for the design to use the pretrained model?
With great appreciation!
Hi, Zhou
It's different between your snapshot and my code. The 'get_last_out_channels' function gets the last channel of features. So you don't need 'cfi_idx' in 'get_last_out_channels' and reconsider to use 'self.features[cfi_idx] as features'.
Also, I checked my code and the unet is working as the original model.
Thanks,
Thanks for your reply!
Yes, I found out that this is because the first layer of vgg is divided into two layers in resnet....
I change 'get_last_out_channels' to plus the number of channels added by the unet++ dense connection, and it seems I am unable to get a channel calculation function like you designed for unet, thus I can not change the backbones directly
but if use 'self.features[cfi_idx] as features', the features are backbone