Hi you guys, pardon me I’m not good at training model. I’m training the model with architecture as following
        out = self.conv2_dw(out)
        out = self.conv_23(out)
        out = self.conv_3(out)
        out = self.conv_34(out)
        out = self.conv_4(out)
        out = self.conv_45(out)
        out = self.conv_5(out)
        out = self.conv_6_sep(out)
        out = self.conv_6_dw(out)
        out = self.conv_6_flatten(out)
        if self.embedding_size != 512:
            out = self.linear(out)
        out = self.bn(out)
        out = self.drop(out)
        out = self.prob(out)
        print("self.prob", out)
        return out

Given self.prob = Linear layer, model gradually converged to good result.
I stopped at 25 epochs due to keep training continue I fear that it tend to overfit.
image976×674 108 KB
why when I run test, output at self.prob is near opposite value
self.prob tensor([[ 4.2354, -4.1672]], device='cuda:0')
sigmoid =>  [[0.9857328  0.01525886]]

Any answer is highly appreciated. Many thanks