Skip to content

torch.Size doesn't accept pytorch scalar #5663

@adamlerer

Description

@adamlerer
import torch

torch.Size([torch.arange(10).max()])

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-9-55c7fb723da0> in <module>()
----> 1 torch.Size([torch.arange(10).max()])

TypeError: torch.Size() takes an iterable of 'int' (item 0 is 'Variable')

Also did the tensor/variable merger mean everything is called 'Variable' now? I would think everything would be called 'Tensor'.

Metadata

Metadata

Assignees

Labels

todoNot as important as medium or high priority tasks, but we will work on these.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions