LostTech.TensorFlow : API Documentation

Type IDimension

Namespace tensorflow

Interfaces IPythonObjectContainer

Public instance methods

object __add__(object other)

Returns the sum of `self` and `other`.

Dimensions are summed as follows:
Parameters
object other
Another Dimension, or a value accepted by `as_dimension`.
Returns
object
A Dimension whose value is the sum of `self` and `other`.
Show Example
tf.compat.v1.Dimension(m)    + tf.compat.v1.Dimension(n)     ==
            tf.compat.v1.Dimension(m + n)
            tf.compat.v1.Dimension(m)    + tf.compat.v1.Dimension(None)  # equiv. to
            tf.compat.v1.Dimension(None)
            tf.compat.v1.Dimension(None) + tf.compat.v1.Dimension(n)     # equiv. to
            tf.compat.v1.Dimension(None)
            tf.compat.v1.Dimension(None) + tf.compat.v1.Dimension(None)  # equiv. to
            tf.compat.v1.Dimension(None) 

object __div__(object other)

DEPRECATED: Use `__floordiv__` via `x // y` instead.

This function exists only for backwards compatibility purposes; new code should use `__floordiv__` via the syntax `x // y`. Using `x // y` communicates clearly that the result rounds down, and is forward compatible to Python 3.
Parameters
object other
Another `Dimension`.
Returns
object
A `Dimension` whose value is the integer quotient of `self` and `other`.

object __floordiv__(object other)

object __ge__(object other)

Returns True if `self` is known to be greater than or equal to `other`.

Dimensions are compared as follows:
Parameters
object other
Another Dimension.
Returns
object
The value of `self.value >= other.value` if both are known, otherwise None.
Show Example
(tf.compat.v1.Dimension(m)    >= tf.compat.v1.Dimension(n))    == (m >= n)
            (tf.compat.v1.Dimension(m)    >= tf.compat.v1.Dimension(None)) == None
            (tf.compat.v1.Dimension(None) >= tf.compat.v1.Dimension(n))    == None
            (tf.compat.v1.Dimension(None) >= tf.compat.v1.Dimension(None)) == None 

object __gt__(object other)

Returns True if `self` is known to be greater than `other`.

Dimensions are compared as follows:
Parameters
object other
Another Dimension.
Returns
object
The value of `self.value > other.value` if both are known, otherwise None.
Show Example
(tf.compat.v1.Dimension(m)    > tf.compat.v1.Dimension(n))    == (m > n)
            (tf.compat.v1.Dimension(m)    > tf.compat.v1.Dimension(None)) == None
            (tf.compat.v1.Dimension(None) > tf.compat.v1.Dimension(n))    == None
            (tf.compat.v1.Dimension(None) > tf.compat.v1.Dimension(None)) == None 

object __le__(object other)

Returns True if `self` is known to be less than or equal to `other`.

Dimensions are compared as follows:
Parameters
object other
Another Dimension.
Returns
object
The value of `self.value <= other.value` if both are known, otherwise None.
Show Example
(tf.compat.v1.Dimension(m)    <= tf.compat.v1.Dimension(n))    == (m <= n)
            (tf.compat.v1.Dimension(m)    <= tf.compat.v1.Dimension(None)) == None
            (tf.compat.v1.Dimension(None) <= tf.compat.v1.Dimension(n))    == None
            (tf.compat.v1.Dimension(None) <= tf.compat.v1.Dimension(None)) == None 

object __lt__(object other)

Returns True if `self` is known to be less than `other`.

Dimensions are compared as follows:
Parameters
object other
Another Dimension.
Returns
object
The value of `self.value < other.value` if both are known, otherwise None.
Show Example
(tf.compat.v1.Dimension(m)    < tf.compat.v1.Dimension(n))    == (m < n)
            (tf.compat.v1.Dimension(m)    < tf.compat.v1.Dimension(None)) == None
            (tf.compat.v1.Dimension(None) < tf.compat.v1.Dimension(n))    == None
            (tf.compat.v1.Dimension(None) < tf.compat.v1.Dimension(None)) == None 

object __mod__(object other)

object __mul__(object other)

Returns the product of `self` and `other`.

Dimensions are summed as follows:
Parameters
object other
Another Dimension, or a value accepted by `as_dimension`.
Returns
object
A Dimension whose value is the product of `self` and `other`.
Show Example
tf.compat.v1.Dimension(m)    * tf.compat.v1.Dimension(n)     ==
            tf.compat.v1.Dimension(m * n)
            tf.compat.v1.Dimension(m)    * tf.compat.v1.Dimension(None)  # equiv. to
            tf.compat.v1.Dimension(None)
            tf.compat.v1.Dimension(None) * tf.compat.v1.Dimension(n)     # equiv. to
            tf.compat.v1.Dimension(None)
            tf.compat.v1.Dimension(None) * tf.compat.v1.Dimension(None)  # equiv. to
            tf.compat.v1.Dimension(None) 

object __radd__(object other)

Returns the sum of `other` and `self`.
Parameters
object other
Another Dimension, or a value accepted by `as_dimension`.
Returns
object
A Dimension whose value is the sum of `self` and `other`.

object __rdiv__(object other)

Use `__floordiv__` via `x // y` instead.

This function exists only to have a better error message. Instead of: `TypeError: unsupported operand type(s) for /: 'int' and 'Dimension'`, this function will explicitly call for usage of `//` instead.
Parameters
object other
Another `Dimension`.

object __rfloordiv__(object other)

object __rmod__(object other)

object __rmul__(object other)

Returns the product of `self` and `other`.
Parameters
object other
Another Dimension, or a value accepted by `as_dimension`.
Returns
object
A Dimension whose value is the product of `self` and `other`.

object __rsub__(object other)

object __rtruediv__(object other)

object __sub__(object other)

object __truediv__(object other)

Public properties

object value get;