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

There may be a bug here. #7

Open
L-Icarus opened this issue Dec 1, 2020 · 1 comment
Open

There may be a bug here. #7

L-Icarus opened this issue Dec 1, 2020 · 1 comment

Comments

@L-Icarus
Copy link

L-Icarus commented Dec 1, 2020

def get_relu_coefs(self, x):
    print(x.shape)
    # axis?
    theta = torch.mean(x, dim=-1)
    if self.conv_type == '2d':
        # axis?
        theta = torch.mean(theta, dim=-1)
    theta = self.fc1(theta)
    theta = self.relu(theta)
    theta = self.fc2(theta)
    theta = 2 * self.sigmoid(theta) - 1
    return theta

My torch version is 1.1.0.
torch.mean(input, dim, out=None) → Tensor

@Islanna
Copy link
Owner

Islanna commented Dec 1, 2020

Thanks! axis instead of dim is definitely a bug.
But no worries, this doesn't affect performance, since pytorch just replaces a wrong keyword axis to correct dim and works as expected.
If you want to fix this bug just make PR, I'll approve it.

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