Skip to content

Commit

Permalink
rcan unshuffle fix
Browse files Browse the repository at this point in the history
  • Loading branch information
the-database committed Jan 9, 2025
1 parent 07e88d0 commit bddaa7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions tests/test_archs/test_archs.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
{"upsampler": "geoensemblepixelshuffle"},
]

EXTRA_ARCH_PARAMS["rcan"] = [
{"unshuffle_mod": True},
{"unshuffle_mod": False},
]

# A list of tuples in the format of (name, arch, scale, extra_params).
FILTERED_REGISTRIES_SCALES_PARAMS = [
(name, arch, scale, extra_params)
Expand Down
2 changes: 1 addition & 1 deletion traiNNer/archs/rcan_arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def __init__(
self.add_mean = nn.Identity()

# define head module
unshuffle_mod = unshuffle_mod and scale < 4
unshuffle_mod = unshuffle_mod and scale <= 2
self.downscale_factor = 1
if unshuffle_mod:
self.downscale_factor = 4 // scale
Expand Down

0 comments on commit bddaa7d

Please sign in to comment.