MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / __ne__

Method __ne__

tensorflow/python/framework/tensor_shape.py:1192–1202  ·  view source on GitHub ↗

Returns True if `self` is known to be different from `other`.

(self, other)

Source from the content-addressed store, hash-verified

1190 return self._dims == other.dims
1191
1192 def __ne__(self, other):
1193 """Returns True if `self` is known to be different from `other`."""
1194 try:
1195 other = as_shape(other)
1196 except TypeError:
1197 return NotImplemented
1198 if self.rank is None or other.rank is None:
1199 raise ValueError("The inequality of unknown TensorShapes is undefined.")
1200 if self.rank != other.rank:
1201 return True
1202 return self._dims != other.dims
1203
1204 def __reduce__(self):
1205 return TensorShape, (self._dims,)

Callers

nothing calls this directly

Calls 1

as_shapeFunction · 0.85

Tested by

no test coverage detected