torch / torch7

http://torch.ch
Other
8.98k stars 2.38k forks source link

nn.Identity() Impact model accuracy #1247

Open mi-luo opened 1 year ago

mi-luo commented 1 year ago

I try to add a Identity like this : class Iden(nn.Module): def __init__(self, c1, c2): super(Iden, self).__init__() self.conv = nn.Identity() def forward(self, x): x = self.conv(x) return x it's just add a placehoder, In theory, it will not affect the accuracy of the model, but In our experiment, it greatly affected the accuracy of the model。 model mAE score was 2.14e-05 but got 0.0095 when we dont add the nn.Identity on the first epoch