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

TypeError: expected Variable as element 1 in argument 0, but got tuple #15

Open
kimna4 opened this issue Mar 9, 2019 · 1 comment
Open

Comments

@kimna4
Copy link

kimna4 commented Mar 9, 2019

Hello,

"TypeError: expected Variable as element 1 in argument 0, but got tuple" Error message is printed at
x = torch.cat((x, s), 1) in Model02.py

I modified some codes following the closed issues.

I tried to debug and fix. But I can't.
Do you know what is the problem?
Thank you

@Atcold
Copy link
Owner

Atcold commented Mar 11, 2019

You may need to update your PyTorch?

>>> a = torch.tensor([[1., 2.]], requires_grad=True)
>>> b = torch.tensor([[3., 4.]], requires_grad=True)
>>> torch.cat((a, b), 1)
tensor([[1., 2., 3., 4.]], grad_fn=<CatBackward>)

For me it works just fine.

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