From 023cf2e959323778a1814c9a4d9b4c135d127a25 Mon Sep 17 00:00:00 2001 From: valhassan Date: Fri, 6 Dec 2024 20:10:07 -0500 Subject: [PATCH] Update DOFASeg model to use a list of encoder output channels for improved flexibility in multi-level feature extraction. Adjusted neck and decoder initialization to accommodate the new output channel structure. --- geo_deep_learning/models/dofa/dofa_seg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/geo_deep_learning/models/dofa/dofa_seg.py b/geo_deep_learning/models/dofa/dofa_seg.py index 5b090072..767dc0bb 100644 --- a/geo_deep_learning/models/dofa/dofa_seg.py +++ b/geo_deep_learning/models/dofa/dofa_seg.py @@ -535,12 +535,12 @@ def __init__(self, self.embedding_dim = 1024 else: raise ValueError(f"Unknown encoder: {encoder}") - + encoder_out_channels = [64, 128, 320, 512] self.neck = MultiLevelNeck(in_channels=self.in_channels, - out_channels=self.embedding_dim, + out_channels=encoder_out_channels, scales=[4, 2, 1, 0.5]) - self.decoder = Decoder(in_channels=self.in_channels, + self.decoder = Decoder(in_channels=encoder_out_channels, embedding_dim=self.embedding_dim, num_classes=num_classes) def forward(self, x):