vikasverma1077 / manifold_mixup

Code for reproducing Manifold Mixup results (ICML 2019)
483 stars 65 forks source link

Error in line 109 of models/resnet.py #12

Open rahuja123 opened 4 years ago

rahuja123 commented 4 years ago

Hi, the original code that you have mentioned in your file (models/resnet.py) is given as:

        out = x

        if layer_mix == 0:
            #out = lam * out + (1 - lam) * out[index,:]
            out, y_a, y_b, lam = mixup_data(out, target, mixup_alpha)
        #print (out)       

        out = F.relu(self.bn1(self.conv1(x)))

        out = self.layer1(out)

At line 109, after the hidden mixup at layer 0, you are using x as input in self.conv1() layer. Shouldn't that be changed to self.conv1(out)?

@vikasverma1077

alexmlamb commented 4 years ago

Hello,

You are right that this line is wrong and we will fix it. However, it does not effect the standard results (for example the example commands in the github repo) because those use the preresnet file and not the resnet.py file:

https://github.com/vikasverma1077/Manifold_mixup_anon/blob/master/models/__init__.py#L19

Best,

Alex.