Skip to content

Commit

Permalink
Update spanplus_arch.py
Browse files Browse the repository at this point in the history
  • Loading branch information
umzi2 authored Aug 5, 2024
1 parent ab6069b commit c15faf6
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions neosr/archs/spanplus_arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def __init__(self,
feature_channels: int = 48,
upscale: int = upscale,
drop_rate: float = 0.0,
upsampler: str = "dys" # "lp", "ps", "conv"- only 1x
upsampler: str = "dys" # "lp", "ps"
):
super(spanplus, self).__init__()

Expand All @@ -172,18 +172,10 @@ def __init__(self,
)
elif upsampler == "dys":
self.upsampler = DySample(feature_channels, out_channels, upscale)
elif upsampler == "conv":
if upscale != 1:
msg = "conv supports only 1x"
raise ValueError(msg)

self.upsampler = nn.Conv2d(feature_channels,
out_channels,
3, padding=1)
else:
raise NotImplementedError(
f'upsampler: {upsampler} not supported, choose one of these options: \
["ps", "dys", "conv"] conv supports only 1x')
["ps", "dys"]')

def forward(self, x):
out = self.feats(x)
Expand Down

0 comments on commit c15faf6

Please sign in to comment.