Skip to content

Tensor.t() should throw an exception on non-2D tensors #7010

@colesbury

Description

@colesbury

PyTorch 0.4 and master

import torch
x = torch.randn(3, 5, 6)
print(x.t().shape)
print(x.t().stride())

Previously, Tensor.t() threw an exception on non-2D tensors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions