Skip to content

Commit

Permalink
Merge pull request #120 from yurujaja/119-fix-gfmswin
Browse files Browse the repository at this point in the history
119 fix gfmswin
  • Loading branch information
gle-bellier authored Nov 12, 2024
2 parents 792e24c + 821fd2e commit 4b3f9cf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions configs/decoder/seg_upernet_mt_none.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
_target_: pangaea.decoders.upernet.SegMTUPerNet

# overwritten in run
encoder: null
num_classes: ${dataset.num_classes}
multi_temporal: ${dataset.multi_temporal}
finetune: ${finetune}

# to adapt
channels: 512
multi_temporal_strategy: none
3 changes: 2 additions & 1 deletion pangaea/decoders/upernet.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ def __init__(
# returns time merged outputs then we don't need multi_temporal_strategy
if self.encoder.multi_temporal and not self.encoder.multi_temporal_output:
self.tmap = None

else:
if self.multi_temporal_strategy == "ltae":
ltae_in_channels = max(decoder_in_channels)
Expand All @@ -302,7 +303,7 @@ def __init__(
def get_decoder_in_channels(
self, multi_temporal_strategy: str | None, encoder: Encoder
) -> list[int]:
if multi_temporal_strategy == "ltae" and encoder.multi_temporal_output:
if multi_temporal_strategy == "ltae":
# if the encoder output channels vary we must use an adaptor before the LTAE
ltae_in_channels = max(encoder.output_dim)
if ltae_in_channels != min(encoder.output_dim):
Expand Down

0 comments on commit 4b3f9cf

Please sign in to comment.