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

Method __rsub__

tensorflow/python/framework/tensor_shape.py:390–403  ·  view source on GitHub ↗

Returns the subtraction of `self` from `other`. Args: other: Another Dimension, or a value accepted by `as_dimension`. Returns: A Dimension whose value is the subtraction of `self` from `other`.

(self, other)

Source from the content-addressed store, hash-verified

388 return Dimension(self._value - other.value)
389
390 def __rsub__(self, other):
391 """Returns the subtraction of `self` from `other`.
392
393 Args:
394 other: Another Dimension, or a value accepted by `as_dimension`.
395
396 Returns:
397 A Dimension whose value is the subtraction of `self` from `other`.
398 """
399 other = as_dimension(other)
400 if self._value is None or other.value is None:
401 return Dimension(None)
402 else:
403 return Dimension(other.value - self._value)
404
405 def __mul__(self, other):
406 """Returns the product of `self` and `other`.

Callers

nothing calls this directly

Calls 2

as_dimensionFunction · 0.85
DimensionClass · 0.70

Tested by

no test coverage detected