Skip to content

torch.* for Variables #206

@soumith

Description

@soumith
import torch
import torch.autograd as ag
a = ag.Variable(torch.randn(10))
b = ag.Variable(torch.randn(10))
torch.cat((a, b), 0)

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-17-f67294b7bb86> in <module>()
      3 a = ag.Variable(torch.randn(10))
      4 b = ag.Variable(torch.randn(10))
----> 5 torch.cat((a, b), 0)

ValueError: cat received an invalid combination of argument types - got (tuple, int), but expected one of:
 * (sequence tensors)
 * (sequence tensors, int dim)
      didn't match because some of the arguments have invalid types: (tuple, int)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions