You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the forward method of class ClassLayer in lib/models.deeplab.py:
defforward(self, x):
x=self.layer(x)
x=self.classification(x)
pred=x.view(x.shape[0], -1)
pred=torch.sigmoid(self.fc(pred))
returnx, pred
the returned x does not represent feature maps anymore because self.classification is an AdaptiveAvgPooling2D with output_size=1, and thus returns a tensor with shape BxCx1x1. Then this is resized to the size of the image later, which doesn't seem to make sense.
Shouldn't it be like this?
defforward(self, x):
x=self.layer(x)
pred=self.classification(x)
pred=pred.view(pred.shape[0], -1)
pred=torch.sigmoid(self.fc(pred))
returnx, pred
The text was updated successfully, but these errors were encountered:
In the
forward
method of classClassLayer
inlib/models.deeplab.py
:the returned
x
does not represent feature maps anymore becauseself.classification
is anAdaptiveAvgPooling2D
withoutput_size=1
, and thus returns a tensor with shape BxCx1x1. Then this is resized to the size of the image later, which doesn't seem to make sense.Shouldn't it be like this?
The text was updated successfully, but these errors were encountered: