speedinghzl / CCNet

CCNet: Criss-Cross Attention for Semantic Segmentation (TPAMI 2020 & ICCV 2019).
MIT License
1.42k stars 277 forks source link

About ccnet.py. 'return [x, x_dsn]' #72

Open yearing1017 opened 4 years ago

yearing1017 commented 4 years ago
def forward(self, x, recurrence=1):
        x = self.relu1(self.bn1(self.conv1(x)))
        x = self.relu2(self.bn2(self.conv2(x)))
        x = self.relu3(self.bn3(self.conv3(x)))
        x = self.maxpool(x)
        x = self.layer1(x)
        x = self.layer2(x)
        x = self.layer3(x)
        x_dsn = self.dsn(x)
        x = self.layer4(x)
        x = self.head(x, recurrence)
        return [x, x_dsn]
speedinghzl commented 4 years ago

@yearing1017 It's for deep supervision. Please refer to the loss function.