LostTech.TensorFlow : API Documentation

Type tf.debugging

Namespace tensorflow

Public static methods

object assert_shapes(IDictionary<object, object> shapes, object data, object summarize, string message, string name)

Assert tensor shapes and dimension size relationships between tensors.

This Op checks that a collection of tensors shape relationships satisfies given constraints.

Example: Example of adding a dependency to an operation: If `x`, `y`, `param` or `scalar` does not have a shape that satisfies all specified constraints, `message`, as well as the first `summarize` entries of the first encountered violating tensor are printed, and `InvalidArgumentError` is raised.

Size entries in the specified shapes are checked against other entries by their __hash__, except: - a size entry is interpreted as an explicit size if it can be parsed as an integer primitive. - a size entry is interpreted as *any* size if it is None or '.'.

If the first entry of a shape is `...` (type `Ellipsis`) or '*' that indicates a variable number of outer dimensions of unspecified size, i.e. the constraint applies to the inner-most dimensions only.

Scalar tensors and specified shapes of length zero (excluding the 'inner-most' prefix) are both treated as having a single dimension of size one.
Parameters
IDictionary<object, object> shapes
dictionary with (`Tensor` to shape) items. A shape must be an iterable.
object data
The tensors to print out if the condition is False. Defaults to error message and first few entries of the violating tensor.
object summarize
Print this many entries of the tensor.
string message
A string to prefix to the default message.
string name
A name for this operation (optional). Defaults to "assert_shapes".
Returns
object
Op raising `InvalidArgumentError` unless all shape constraints are satisfied. If static checks determine all constraints are satisfied, a `no_op` is returned.
Show Example
tf.assert_shapes({
              (x, ('N', 'Q')),
              (y, ('N', 'D')),
              (param, ('Q',)),
              (scalar, ())
            }) 

object assert_shapes(IEnumerable<KeyValuePair<object, object>> shapes, object data, object summarize, string message, string name)

Assert tensor shapes and dimension size relationships between tensors.

This Op checks that a collection of tensors shape relationships satisfies given constraints.

Example: Example of adding a dependency to an operation: If `x`, `y`, `param` or `scalar` does not have a shape that satisfies all specified constraints, `message`, as well as the first `summarize` entries of the first encountered violating tensor are printed, and `InvalidArgumentError` is raised.

Size entries in the specified shapes are checked against other entries by their __hash__, except: - a size entry is interpreted as an explicit size if it can be parsed as an integer primitive. - a size entry is interpreted as *any* size if it is None or '.'.

If the first entry of a shape is `...` (type `Ellipsis`) or '*' that indicates a variable number of outer dimensions of unspecified size, i.e. the constraint applies to the inner-most dimensions only.

Scalar tensors and specified shapes of length zero (excluding the 'inner-most' prefix) are both treated as having a single dimension of size one.
Parameters
IEnumerable<KeyValuePair<object, object>> shapes
dictionary with (`Tensor` to shape) items. A shape must be an iterable.
object data
The tensors to print out if the condition is False. Defaults to error message and first few entries of the violating tensor.
object summarize
Print this many entries of the tensor.
string message
A string to prefix to the default message.
string name
A name for this operation (optional). Defaults to "assert_shapes".
Returns
object
Op raising `InvalidArgumentError` unless all shape constraints are satisfied. If static checks determine all constraints are satisfied, a `no_op` is returned.
Show Example
tf.assert_shapes({
              (x, ('N', 'Q')),
              (y, ('N', 'D')),
              (param, ('Q',)),
              (scalar, ())
            }) 

object assert_shapes_dyn(object shapes, object data, object summarize, object message, object name)

Assert tensor shapes and dimension size relationships between tensors.

This Op checks that a collection of tensors shape relationships satisfies given constraints.

Example: Example of adding a dependency to an operation: If `x`, `y`, `param` or `scalar` does not have a shape that satisfies all specified constraints, `message`, as well as the first `summarize` entries of the first encountered violating tensor are printed, and `InvalidArgumentError` is raised.

Size entries in the specified shapes are checked against other entries by their __hash__, except: - a size entry is interpreted as an explicit size if it can be parsed as an integer primitive. - a size entry is interpreted as *any* size if it is None or '.'.

If the first entry of a shape is `...` (type `Ellipsis`) or '*' that indicates a variable number of outer dimensions of unspecified size, i.e. the constraint applies to the inner-most dimensions only.

Scalar tensors and specified shapes of length zero (excluding the 'inner-most' prefix) are both treated as having a single dimension of size one.
Parameters
object shapes
dictionary with (`Tensor` to shape) items. A shape must be an iterable.
object data
The tensors to print out if the condition is False. Defaults to error message and first few entries of the violating tensor.
object summarize
Print this many entries of the tensor.
object message
A string to prefix to the default message.
object name
A name for this operation (optional). Defaults to "assert_shapes".
Returns
object
Op raising `InvalidArgumentError` unless all shape constraints are satisfied. If static checks determine all constraints are satisfied, a `no_op` is returned.
Show Example
tf.assert_shapes({
              (x, ('N', 'Q')),
              (y, ('N', 'D')),
              (param, ('Q',)),
              (scalar, ())
            }) 

bool get_log_device_placement()

Get if device placements are logged.
Returns
bool
If device placements are logged.

object get_log_device_placement_dyn()

Get if device placements are logged.
Returns
object
If device placements are logged.

void set_log_device_placement(bool enabled)

Set if device placements should be logged.
Parameters
bool enabled
Whether to enabled device placement logging.

object set_log_device_placement_dyn(object enabled)

Set if device placements should be logged.
Parameters
object enabled
Whether to enabled device placement logging.

Public properties

PythonFunctionContainer assert_shapes_fn get;

PythonFunctionContainer get_log_device_placement_fn get;

PythonFunctionContainer set_log_device_placement_fn get;