update common.py Classify()

This commit is contained in:
Glenn Jocher committed 2020-07-16 23:59:51 -07:00
1 parent 2efa01db0e
commit a97c3f94ec
1 file changed
+2 -1
+2 -1
View File
@@ -112,4 +112,5 @@ class Classify(nn.Module):
self.flat = Flatten()
def forward(self, x):
return self.flat(self.conv(self.aap(x))) # flatten to x(b,c2)
z = torch.cat([self.aap(y) for y in (x if isinstance(x, list) else [x])], 1) # cat if list
return self.flat(self.conv(z)) # flatten to x(b,c2)