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

Warning: grad and param do not obey the gradient layout contract. #74

Open
mohaEs opened this issue Jan 13, 2022 · 3 comments
Open

Warning: grad and param do not obey the gradient layout contract. #74

mohaEs opened this issue Jan 13, 2022 · 3 comments

Comments

@mohaEs
Copy link

mohaEs commented Jan 13, 2022

Has anybody gotten a similar warning when using it?

Warning: grad and param do not obey the gradient layout contract. This is not an error, but may impair performance.
grad.sizes() = [512, 256, 1, 1], strides() = [256, 1, 1, 1]
param.sizes() = [512, 256, 1, 1], strides() = [256, 1, 256, 256] (function operator())

@hcmea
Copy link

hcmea commented Feb 4, 2022

@mohaEs, I just started training BYOL with my custom dataset and got the same warning too. Did your model performed better on the downstream task? Does this warning effect the performance?

@zmzhang2000
Copy link

I got the same warning too. And the loss becomes NaN during training. Still not figured it out.

@zmzhang2000
Copy link

I got the same warning too. And the loss becomes NaN during training. Still not figured it out.

I set the input to be contiguous and then the warning disappeared.

input = input.contiguous()

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

3 participants