From eb2a9b53e43c2e4ce82a2ea6b340949293be7252 Mon Sep 17 00:00:00 2001 From: Qiang Cai Date: Fri, 8 Aug 2025 11:06:56 +0100 Subject: [PATCH] Add missing name attribute to deeplabv3 & deeplabv3plus --- segmentation_models_pytorch/decoders/deeplabv3/model.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/segmentation_models_pytorch/decoders/deeplabv3/model.py b/segmentation_models_pytorch/decoders/deeplabv3/model.py index 38ca9e04..b64ccf25 100644 --- a/segmentation_models_pytorch/decoders/deeplabv3/model.py +++ b/segmentation_models_pytorch/decoders/deeplabv3/model.py @@ -119,6 +119,7 @@ def __init__( ) else: self.classification_head = None + self.name = "deeplabv3-{}".format(encoder_name) def load_state_dict(self, state_dict, *args, **kwargs): # For backward compatibility, previously Decoder module was Sequential @@ -238,3 +239,4 @@ def __init__( ) else: self.classification_head = None + self.name = "deeplabv3plus-{}".format(encoder_name)