Skip to content

Commit

Permalink
Tensor eq
Browse files Browse the repository at this point in the history
  • Loading branch information
albertz committed Mar 16, 2023
1 parent d69f279 commit e0541e4
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions returnn/tensor/_tensor_op_overloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,8 @@ class _TensorOpOverloadsMixin(_TensorMixinBase):

# --- comparisons

# _TensorMixin.__eq__ is disabled as per the following error in some TF tests:
# AssertionError: unhashable type: 'Tensor'.
# See CI https://github.com/rwth-i6/returnn/actions/runs/4406240591
"""
def __eq__(self: Tensor, other: Union[_frontend_api.RawTensorTypes, Tensor]) -> Tensor:
return self.raw_frontend.compare(self, "==", other)
"""

def __ne__(self: Tensor, other: Union[_frontend_api.RawTensorTypes, Tensor]) -> Tensor:
return self.raw_frontend.compare(self, "!=", other)
Expand Down

0 comments on commit e0541e4

Please sign in to comment.