segmentation_models.pytorch
segmentation_models.pytorch copied to clipboard
Accessing inner layers outputs in segmentation models
Hello! Let's say I define a segmentation model as follows. Is there a way that I can access multiple prediction layers from different levels of the decoder so that I could bring them to the final output size with upsampling?
model = smp.Unet(
encoder_name="resnet34",
encoder_weights="imagenet",
in_channels=1,
classes=3,
)
In a more general way, can I build a custom model that inherits from the model above (or from the smp
module in some way) so that I could customize/expand upon the smp
models for my needs?
Thanks!