This commit is contained in:
Glenn Jocher 2020-02-22 12:56:20 -08:00
parent 2d9bc62526
commit 3cf8a13910
1 changed files with 1 additions and 6 deletions

View File

@ -141,15 +141,10 @@ class weightedFeatureFusion(nn.Module): # weighted sum of 2 or more layers http
# Adjust channels
if dc > 0: # slice input
# a = nn.ZeroPad2d((0, 0, 0, 0, 0, dc))(a)
x[:, :ac] = x[:, :ac] + a
x[:, :ac] = x[:, :ac] + a # or a = nn.ZeroPad2d((0, 0, 0, 0, 0, dc))(a); x = x + a
elif dc < 0: # slice feature
if self.n == 2:
return x + a[:, :nc]
x = x + a[:, :nc]
else: # same shape
if self.n == 2:
return x + a
x = x + a
return x