Skip to content

Problem with comparison overload operators #296

@fmassa

Description

@fmassa

Instead of raising an error or behaving like their equivalent gt/eq/etc functions, it simply returns a boolean.

>>> import torch
>>> a = torch.rand(5)
>>> a

 0.8091
 0.1895
 0.0382
 0.9516
 0.6266
[torch.FloatTensor of size 5]

>>> a > 0.2
True
>>> a == 1
False

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions