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 when run train.py #198

Open
ccuiyuhan opened this issue Apr 20, 2020 · 2 comments
Open

Error when run train.py #198

ccuiyuhan opened this issue Apr 20, 2020 · 2 comments

Comments

@ccuiyuhan
Copy link

I met the error:
RuntimeError: unsupported operation: more than one element of the written-to tensor refers to a single memory location. Please clone() the tensor before performing the operation.
How to solve this problem
Hope an answer!Thanks!

@deepglugs
Copy link

set pin_memory to false (and possibly workers to 1) in your preset.json

@YunfeiChenMY
Copy link

            loss = cl_loss + reconstruction_loss * config['training']['lambda2']
          repeat:
            loss = cl_loss.item() + reconstruction_loss * config['training']['lambda2']

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