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

Function FusedLeakyReLUFunctionBackward returned an invalid gradient at index 1 - got [6] but expected shape compatible with [512] #128

Open
visa980911 opened this issue Aug 8, 2024 · 1 comment

Comments

@visa980911
Copy link

I really like your work. I've encountered a problem using your network for a different field, but during the training process, I encountered the following error:

Traceback (most recent call last): File "scripts/train.py", line 63, in main(opts) File "scripts/train.py", line 52, in main loss.backward() File "/root/autodl-tmp/conda/envs/Del/lib/python3.8/site-packages/torch/tensor.py", line 221, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "/root/autodl-tmp/conda/envs/Del/lib/python3.8/site-packages/torch/autograd/init.py", line 130, in backward Variable._execution_engine.run_backward( RuntimeError: Function FusedLeakyReLUFunctionBackward returned an invalid gradient at index 1 - got [6] but expected shape compatible with [512]

i use the same network constructure, forward is okay, but backward encountered this issue.

Is there any solution to this problem? thx to anyones help.

@Ab-34
Copy link

Ab-34 commented Dec 4, 2024

Hi, Could you please tell me how you installed your environment for global directions experiment? Specifically the python, torch, CUDA and tensorflow version? I would really appreciate your help.

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