Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rahuja123 opened this issue Aug 5, 2020 · 1 comment
Open

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

rahuja123 opened this issue Aug 5, 2020 · 1 comment

Comments

@rahuja123
Copy link

rahuja123 commented Aug 5, 2020

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
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants