tensorbuilder.api.applicative module
from classes import Applicative __all__ = ["Applicative"]
Classes
class Applicative
docstring for Applicative
class Applicative(ApplicativeBase): """docstring for Applicative""" def __init__(self, f): super(Applicative, self).__init__(f) def Builder(self, tensor): return Builder(tensor)
Ancestors (in MRO)
- Applicative
- tensorbuilder.core.applicative.ApplicativeBase
- __builtin__.object
Methods
def __init__(
self, f)
def __init__(self, f): super(Applicative, self).__init__(f)
def Assert(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.Assert, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.Assert
Return
Applicative
Origial documentation for Builder.Assert
def Assert(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.Assert
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.Assert
def Assert(condition, data, summarize=None, name=None)
Asserts that the given condition is true.
If condition
evaluates to false, print the list of tensors in data
.
summarize
determines how many entries of the tensors to print.
NOTE: To ensure that Assert executes, one usually attaches a dependency:
python
# Ensure maximum element of x is smaller or equal to 1
assert_op = tf.Assert(tf.less_equal(tf.reduce_max(x), 1.), [x])
x = tf.with_dependencies([assert_op], x)
Args: condition: The condition to evaluate. data: The tensors to print out when condition is false. summarize: Print this many entries of each tensor. name: A name for this operation (optional).
Returns:
assert_op: An Operation
that, when executed, raises a
tf.errors.InvalidArgumentError
if condition
is not true.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def Assert_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.Assert_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.Assert_layer
Return
Applicative
Origial documentation for Builder.Assert_layer
def Assert_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.Assert, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.Assert
def Assert(condition, data, summarize=None, name=None):
Asserts that the given condition is true.
If condition
evaluates to false, print the list of tensors in data
.
summarize
determines how many entries of the tensors to print.
NOTE: To ensure that Assert executes, one usually attaches a dependency:
python
# Ensure maximum element of x is smaller or equal to 1
assert_op = tf.Assert(tf.less_equal(tf.reduce_max(x), 1.), [x])
x = tf.with_dependencies([assert_op], x)
Args: condition: The condition to evaluate. data: The tensors to print out when condition is false. summarize: Print this many entries of each tensor. name: A name for this operation (optional).
Returns:
assert_op: An Operation
that, when executed, raises a
tf.errors.InvalidArgumentError
if condition
is not true.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def Builder(
self, tensor)
def Builder(self, tensor): return Builder(tensor)
def BuilderTree(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.BuilderTree, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.BuilderTree
Return
Applicative
Origial documentation for Builder.BuilderTree
def BuilderTree(self, builder_iterable):
None
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def NoGradient_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.NoGradient_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.NoGradient_layer
Return
Applicative
Origial documentation for Builder.NoGradient_layer
def NoGradient_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.NoGradient, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.NoGradient
def NotDifferentiable(op_type):
Specifies that ops of type op_type
is not differentiable.
This function should not be used for operations that have a well-defined gradient that is not yet implemented.
This function is only used when defining a new op type. It may be
used for ops such as tf.size()
that are not differentiable. For
example:
python
tf.NotDifferentiable("Size")
The gradient computed for 'op_type' will then propagate zeros.
For ops that have a well-defined gradient but are not yet implemented, no declaration should be made, and an error must be thrown if an attempt to request its gradient is made.
Args:
op_type: The string type of an operation. This corresponds to the
OpDef.name
field for the proto that defines the operation.
Raises:
TypeError: If op_type
is not a string.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def NotDifferentiable(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.NotDifferentiable, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.NotDifferentiable
Return
Applicative
Origial documentation for Builder.NotDifferentiable
def NotDifferentiable(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.NotDifferentiable
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.NotDifferentiable
def NotDifferentiable(op_type)
Specifies that ops of type op_type
is not differentiable.
This function should not be used for operations that have a well-defined gradient that is not yet implemented.
This function is only used when defining a new op type. It may be
used for ops such as tf.size()
that are not differentiable. For
example:
python
tf.NotDifferentiable("Size")
The gradient computed for 'op_type' will then propagate zeros.
For ops that have a well-defined gradient but are not yet implemented, no declaration should be made, and an error must be thrown if an attempt to request its gradient is made.
Args:
op_type: The string type of an operation. This corresponds to the
OpDef.name
field for the proto that defines the operation.
Raises:
TypeError: If op_type
is not a string.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def NotDifferentiable_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.NotDifferentiable_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.NotDifferentiable_layer
Return
Applicative
Origial documentation for Builder.NotDifferentiable_layer
def NotDifferentiable_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.NotDifferentiable, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.NotDifferentiable
def NotDifferentiable(op_type):
Specifies that ops of type op_type
is not differentiable.
This function should not be used for operations that have a well-defined gradient that is not yet implemented.
This function is only used when defining a new op type. It may be
used for ops such as tf.size()
that are not differentiable. For
example:
python
tf.NotDifferentiable("Size")
The gradient computed for 'op_type' will then propagate zeros.
For ops that have a well-defined gradient but are not yet implemented, no declaration should be made, and an error must be thrown if an attempt to request its gradient is made.
Args:
op_type: The string type of an operation. This corresponds to the
OpDef.name
field for the proto that defines the operation.
Raises:
TypeError: If op_type
is not a string.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def Print(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.Print, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.Print
Return
Applicative
Origial documentation for Builder.Print
def Print(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.Print
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.Print
def Print(input_, data, message=None, first_n=None, summarize=None, name=None)
Prints a list of tensors.
This is an identity op with the side effect of printing data
when
evaluating.
Args:
input_: A tensor passed through this op.
data: A list of tensors to print out when op is evaluated.
message: A string, prefix of the error message.
first_n: Only log first_n
number of times. Negative numbers log always;
this is the default.
summarize: Only print this many entries of each tensor. If None, then a
maximum of 3 elements are printed per input tensor.
name: A name for the operation (optional).
Returns:
Same tensor as input_
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def Print_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.Print_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.Print_layer
Return
Applicative
Origial documentation for Builder.Print_layer
def Print_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.Print, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.Print
def Print(input_, data, message=None, first_n=None, summarize=None, name=None):
Prints a list of tensors.
This is an identity op with the side effect of printing data
when
evaluating.
Args:
input_: A tensor passed through this op.
data: A list of tensors to print out when op is evaluated.
message: A string, prefix of the error message.
first_n: Only log first_n
number of times. Negative numbers log always;
this is the default.
summarize: Only print this many entries of each tensor. If None, then a
maximum of 3 elements are printed per input tensor.
name: A name for the operation (optional).
Returns:
Same tensor as input_
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def abs(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.abs, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.abs
Return
Applicative
Origial documentation for Builder.abs
def abs(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.abs
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.abs
def abs(x, name=None)
Computes the absolute value of a tensor.
Given a tensor of real numbers x
, this operation returns a tensor
containing the absolute value of each element in x
. For example, if x is
an input element and y is an output element, this operation computes
\(y = |x|\).
See tf.complex_abs()
to compute the absolute value of a complex
number.
Args:
x: A Tensor
or SparseTensor
of type float32
, float64
, int32
, or
int64
.
name: A name for the operation (optional).
Returns:
A Tensor
or SparseTensor
the same size and type as x
with absolute
values.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def abs_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.abs_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.abs_layer
Return
Applicative
Origial documentation for Builder.abs_layer
def abs_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.abs, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.abs
def abs(x, name=None):
Computes the absolute value of a tensor.
Given a tensor of real numbers x
, this operation returns a tensor
containing the absolute value of each element in x
. For example, if x is
an input element and y is an output element, this operation computes
\(y = |x|\).
See tf.complex_abs()
to compute the absolute value of a complex
number.
Args:
x: A Tensor
or SparseTensor
of type float32
, float64
, int32
, or
int64
.
name: A name for the operation (optional).
Returns:
A Tensor
or SparseTensor
the same size and type as x
with absolute
values.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def accumulate_n(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.accumulate_n, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.accumulate_n
Return
Applicative
Origial documentation for Builder.accumulate_n
def accumulate_n(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.accumulate_n
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.accumulate_n
def accumulate_n(inputs, shape=None, tensor_dtype=None, name=None)
Returns the element-wise sum of a list of tensors.
Optionally, pass shape
and tensor_dtype
for shape and type checking,
otherwise, these are inferred.
NOTE: This operation is not differentiable and cannot be used if inputs depend on trainable variables. Please use tf.add_n for such cases.
For example:
```python
tensor 'a' is [[1, 2], [3, 4]]
tensor b
is [[5, 0], [0, 6]]
tf.accumulate_n([a, b, a]) ==> [[7, 4], [6, 14]]
Explicitly pass shape and type
tf.accumulate_n([a, b, a], shape=[2, 2], tensor_dtype=tf.int32) ==> [[7, 4], [6, 14]] ```
Args:
inputs: A list of Tensor
objects, each with same shape and type.
shape: Shape of elements of inputs
.
tensor_dtype: The type of inputs
.
name: A name for the operation (optional).
Returns:
A Tensor
of same shape and type as the elements of inputs
.
Raises:
ValueError: If inputs
don't all have same shape and dtype or the shape
cannot be inferred.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def accumulate_n_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.accumulate_n_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.accumulate_n_layer
Return
Applicative
Origial documentation for Builder.accumulate_n_layer
def accumulate_n_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.accumulate_n, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.accumulate_n
def accumulate_n(inputs, shape=None, tensor_dtype=None, name=None):
Returns the element-wise sum of a list of tensors.
Optionally, pass shape
and tensor_dtype
for shape and type checking,
otherwise, these are inferred.
NOTE: This operation is not differentiable and cannot be used if inputs depend on trainable variables. Please use tf.add_n for such cases.
For example:
```python
tensor 'a' is [[1, 2], [3, 4]]
tensor b
is [[5, 0], [0, 6]]
tf.accumulate_n([a, b, a]) ==> [[7, 4], [6, 14]]
Explicitly pass shape and type
tf.accumulate_n([a, b, a], shape=[2, 2], tensor_dtype=tf.int32) ==> [[7, 4], [6, 14]] ```
Args:
inputs: A list of Tensor
objects, each with same shape and type.
shape: Shape of elements of inputs
.
tensor_dtype: The type of inputs
.
name: A name for the operation (optional).
Returns:
A Tensor
of same shape and type as the elements of inputs
.
Raises:
ValueError: If inputs
don't all have same shape and dtype or the shape
cannot be inferred.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def acos(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.acos, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.acos
Return
Applicative
Origial documentation for Builder.acos
def acos(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.acos
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.acos
def acos(x, name=None)
Computes acos of x element-wise.
Args:
x: A Tensor
. Must be one of the following types: half
, float32
, float64
, int32
, int64
, complex64
, complex128
.
name: A name for the operation (optional).
Returns:
A Tensor
. Has the same type as x
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def acos_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.acos_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.acos_layer
Return
Applicative
Origial documentation for Builder.acos_layer
def acos_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.acos, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.acos
def acos(x, name=None):
Computes acos of x element-wise.
Args:
x: A Tensor
. Must be one of the following types: half
, float32
, float64
, int32
, int64
, complex64
, complex128
.
name: A name for the operation (optional).
Returns:
A Tensor
. Has the same type as x
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def add(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.add, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.add
Return
Applicative
Origial documentation for Builder.add
def add(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.add
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.add
def add(x, y, name=None)
Returns x + y element-wise.
NOTE: Add
supports broadcasting. AddN
does not. More about broadcasting
here
Args:
x: A Tensor
. Must be one of the following types: half
, float32
, float64
, uint8
, int8
, int16
, int32
, int64
, complex64
, complex128
, string
.
y: A Tensor
. Must have the same type as x
.
name: A name for the operation (optional).
Returns:
A Tensor
. Has the same type as x
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def add_check_numerics_ops(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.add_check_numerics_ops, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.add_check_numerics_ops
Return
Applicative
Origial documentation for Builder.add_check_numerics_ops
def add_check_numerics_ops(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.add_check_numerics_ops
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.add_check_numerics_ops
def add_check_numerics_ops()
Connect a check_numerics
to every floating point tensor.
check_numerics
operations themselves are added for each half
, float
,
or double
tensor in the graph. For all ops in the graph, the
check_numerics
op for all of its (half
, float
, or double
) inputs
is guaranteed to run before the check_numerics
op on any of its outputs.
Returns:
A group
op depending on all check_numerics
ops added.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def add_check_numerics_ops_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.add_check_numerics_ops_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.add_check_numerics_ops_layer
Return
Applicative
Origial documentation for Builder.add_check_numerics_ops_layer
def add_check_numerics_ops_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.add_check_numerics_ops, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.add_check_numerics_ops
def add_check_numerics_ops():
Connect a check_numerics
to every floating point tensor.
check_numerics
operations themselves are added for each half
, float
,
or double
tensor in the graph. For all ops in the graph, the
check_numerics
op for all of its (half
, float
, or double
) inputs
is guaranteed to run before the check_numerics
op on any of its outputs.
Returns:
A group
op depending on all check_numerics
ops added.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def add_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.add_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.add_layer
Return
Applicative
Origial documentation for Builder.add_layer
def add_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.add, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.add
def add(x, y, name=None):
Returns x + y element-wise.
NOTE: Add
supports broadcasting. AddN
does not. More about broadcasting
here
Args:
x: A Tensor
. Must be one of the following types: half
, float32
, float64
, uint8
, int8
, int16
, int32
, int64
, complex64
, complex128
, string
.
y: A Tensor
. Must have the same type as x
.
name: A name for the operation (optional).
Returns:
A Tensor
. Has the same type as x
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def add_n(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.add_n, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.add_n
Return
Applicative
Origial documentation for Builder.add_n
def add_n(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.add_n
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.add_n
def add_n(inputs, name=None)
Adds all input tensors element-wise.
Args:
inputs: A list of Tensor
objects, each with same shape and type.
name: A name for the operation (optional).
Returns:
A Tensor
of same shape and type as the elements of inputs
.
Raises:
ValueError: If inputs
don't all have same shape and dtype or the shape
cannot be inferred.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def add_n_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.add_n_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.add_n_layer
Return
Applicative
Origial documentation for Builder.add_n_layer
def add_n_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.add_n, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.add_n
def add_n(inputs, name=None):
Adds all input tensors element-wise.
Args:
inputs: A list of Tensor
objects, each with same shape and type.
name: A name for the operation (optional).
Returns:
A Tensor
of same shape and type as the elements of inputs
.
Raises:
ValueError: If inputs
don't all have same shape and dtype or the shape
cannot be inferred.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def add_regularization_loss(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.add_regularization_loss, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.add_regularization_loss
Return
Applicative
Origial documentation for Builder.add_regularization_loss
def add_regularization_loss(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tensorbuilder.add_regularization_loss
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tensorbuilder.add_regularization_loss
def add_regularization_loss(tensor, graph=None, scope="add_regularization_loss")
None
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def add_to_collection(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.add_to_collection, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.add_to_collection
Return
Applicative
Origial documentation for Builder.add_to_collection
def add_to_collection(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.add_to_collection
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.add_to_collection
def add_to_collection(name, value)
Wrapper for Graph.add_to_collection()
using the default graph.
See Graph.add_to_collection()
for more details.
Args:
name: The key for the collection. For example, the GraphKeys
class
contains many standard names for collections.
value: The value to add to the collection.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def add_to_collection_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.add_to_collection_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.add_to_collection_layer
Return
Applicative
Origial documentation for Builder.add_to_collection_layer
def add_to_collection_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.add_to_collection, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.add_to_collection
def add_to_collection(name, value):
Wrapper for Graph.add_to_collection()
using the default graph.
See Graph.add_to_collection()
for more details.
Args:
name: The key for the collection. For example, the GraphKeys
class
contains many standard names for collections.
value: The value to add to the collection.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def all_candidate_sampler(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.all_candidate_sampler, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.all_candidate_sampler
Return
Applicative
Origial documentation for Builder.all_candidate_sampler
def all_candidate_sampler(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.nn.all_candidate_sampler
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.nn.all_candidate_sampler
def all_candidate_sampler(true_classes, num_true, num_sampled, unique, seed=None, name=None)
Generate the set of all classes.
Deterministically generates and returns the set of all possible classes. For testing purposes. There is no need to use this, since you might as well use full softmax or full logistic regression.
Args:
true_classes: A Tensor
of type int64
and shape [batch_size,
num_true]
. The target classes.
num_true: An int
. The number of target classes per training example.
num_sampled: An int
. The number of possible classes.
unique: A bool
. Ignored.
unique.
seed: An int
. An operation-specific seed. Default is 0.
name: A name for the operation (optional).
Returns:
sampled_candidates: A tensor of type int64
and shape [num_sampled]
.
This operation deterministically returns the entire range
[0, num_sampled]
.
true_expected_count: A tensor of type float
. Same shape as
true_classes
. The expected counts under the sampling distribution
of each of true_classes
. All returned values are 1.0.
sampled_expected_count: A tensor of type float
. Same shape as
sampled_candidates
. The expected counts under the sampling distribution
of each of sampled_candidates
. All returned values are 1.0.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def all_candidate_sampler_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.all_candidate_sampler_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.all_candidate_sampler_layer
Return
Applicative
Origial documentation for Builder.all_candidate_sampler_layer
def all_candidate_sampler_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.nn.all_candidate_sampler, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.nn.all_candidate_sampler
def all_candidate_sampler(true_classes, num_true, num_sampled, unique, seed=None, name=None):
Generate the set of all classes.
Deterministically generates and returns the set of all possible classes. For testing purposes. There is no need to use this, since you might as well use full softmax or full logistic regression.
Args:
true_classes: A Tensor
of type int64
and shape [batch_size,
num_true]
. The target classes.
num_true: An int
. The number of target classes per training example.
num_sampled: An int
. The number of possible classes.
unique: A bool
. Ignored.
unique.
seed: An int
. An operation-specific seed. Default is 0.
name: A name for the operation (optional).
Returns:
sampled_candidates: A tensor of type int64
and shape [num_sampled]
.
This operation deterministically returns the entire range
[0, num_sampled]
.
true_expected_count: A tensor of type float
. Same shape as
true_classes
. The expected counts under the sampling distribution
of each of true_classes
. All returned values are 1.0.
sampled_expected_count: A tensor of type float
. Same shape as
sampled_candidates
. The expected counts under the sampling distribution
of each of sampled_candidates
. All returned values are 1.0.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def all_variables(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.all_variables, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.all_variables
Return
Applicative
Origial documentation for Builder.all_variables
def all_variables(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.all_variables
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.all_variables
def all_variables()
Returns all variables that must be saved/restored.
The Variable()
constructor automatically adds new variables to the graph
collection GraphKeys.VARIABLES
. This convenience function returns the
contents of that collection.
Returns:
A list of Variable
objects.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def all_variables_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.all_variables_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.all_variables_layer
Return
Applicative
Origial documentation for Builder.all_variables_layer
def all_variables_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.all_variables, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.all_variables
def all_variables():
Returns all variables that must be saved/restored.
The Variable()
constructor automatically adds new variables to the graph
collection GraphKeys.VARIABLES
. This convenience function returns the
contents of that collection.
Returns:
A list of Variable
objects.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def arg_max(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.arg_max, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.arg_max
Return
Applicative
Origial documentation for Builder.arg_max
def arg_max(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.arg_max
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.arg_max
def arg_max(input, dimension, name=None)
Returns the index with the largest value across dimensions of a tensor.
Args:
input: A Tensor
. Must be one of the following types: float32
, float64
, int64
, int32
, uint8
, uint16
, int16
, int8
, complex64
, complex128
, qint8
, quint8
, qint32
, half
.
dimension: A Tensor
. Must be one of the following types: int32
, int64
.
int32, 0 <= dimension < rank(input). Describes which dimension
of the input Tensor to reduce across. For vectors, use dimension = 0.
name: A name for the operation (optional).
Returns:
A Tensor
of type int64
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def arg_max_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.arg_max_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.arg_max_layer
Return
Applicative
Origial documentation for Builder.arg_max_layer
def arg_max_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.arg_max, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.arg_max
def arg_max(input, dimension, name=None):
Returns the index with the largest value across dimensions of a tensor.
Args:
input: A Tensor
. Must be one of the following types: float32
, float64
, int64
, int32
, uint8
, uint16
, int16
, int8
, complex64
, complex128
, qint8
, quint8
, qint32
, half
.
dimension: A Tensor
. Must be one of the following types: int32
, int64
.
int32, 0 <= dimension < rank(input). Describes which dimension
of the input Tensor to reduce across. For vectors, use dimension = 0.
name: A name for the operation (optional).
Returns:
A Tensor
of type int64
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def arg_min(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.arg_min, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.arg_min
Return
Applicative
Origial documentation for Builder.arg_min
def arg_min(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.arg_min
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.arg_min
def arg_min(input, dimension, name=None)
Returns the index with the smallest value across dimensions of a tensor.
Args:
input: A Tensor
. Must be one of the following types: float32
, float64
, int64
, int32
, uint8
, uint16
, int16
, int8
, complex64
, complex128
, qint8
, quint8
, qint32
, half
.
dimension: A Tensor
. Must be one of the following types: int32
, int64
.
int32, 0 <= dimension < rank(input). Describes which dimension
of the input Tensor to reduce across. For vectors, use dimension = 0.
name: A name for the operation (optional).
Returns:
A Tensor
of type int64
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def arg_min_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.arg_min_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.arg_min_layer
Return
Applicative
Origial documentation for Builder.arg_min_layer
def arg_min_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.arg_min, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.arg_min
def arg_min(input, dimension, name=None):
Returns the index with the smallest value across dimensions of a tensor.
Args:
input: A Tensor
. Must be one of the following types: float32
, float64
, int64
, int32
, uint8
, uint16
, int16
, int8
, complex64
, complex128
, qint8
, quint8
, qint32
, half
.
dimension: A Tensor
. Must be one of the following types: int32
, int64
.
int32, 0 <= dimension < rank(input). Describes which dimension
of the input Tensor to reduce across. For vectors, use dimension = 0.
name: A name for the operation (optional).
Returns:
A Tensor
of type int64
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def argmax_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.argmax_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.argmax_layer
Return
Applicative
Origial documentation for Builder.argmax_layer
def argmax_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.argmax, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.argmax
def arg_max(input, dimension, name=None):
Returns the index with the largest value across dimensions of a tensor.
Args:
input: A Tensor
. Must be one of the following types: float32
, float64
, int64
, int32
, uint8
, uint16
, int16
, int8
, complex64
, complex128
, qint8
, quint8
, qint32
, half
.
dimension: A Tensor
. Must be one of the following types: int32
, int64
.
int32, 0 <= dimension < rank(input). Describes which dimension
of the input Tensor to reduce across. For vectors, use dimension = 0.
name: A name for the operation (optional).
Returns:
A Tensor
of type int64
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def argmin_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.argmin_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.argmin_layer
Return
Applicative
Origial documentation for Builder.argmin_layer
def argmin_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.argmin, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.argmin
def arg_min(input, dimension, name=None):
Returns the index with the smallest value across dimensions of a tensor.
Args:
input: A Tensor
. Must be one of the following types: float32
, float64
, int64
, int32
, uint8
, uint16
, int16
, int8
, complex64
, complex128
, qint8
, quint8
, qint32
, half
.
dimension: A Tensor
. Must be one of the following types: int32
, int64
.
int32, 0 <= dimension < rank(input). Describes which dimension
of the input Tensor to reduce across. For vectors, use dimension = 0.
name: A name for the operation (optional).
Returns:
A Tensor
of type int64
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def as_dtype(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.as_dtype, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.as_dtype
Return
Applicative
Origial documentation for Builder.as_dtype
def as_dtype(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.as_dtype
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.as_dtype
def as_dtype(type_value)
Converts the given type_value
to a DType
.
Args:
type_value: A value that can be converted to a tf.DType
object. This may currently be a tf.DType
object, a
DataType
enum,
a string type name, or a numpy.dtype
.
Returns:
A DType
corresponding to type_value
.
Raises:
TypeError: If type_value
cannot be converted to a DType
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def as_dtype_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.as_dtype_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.as_dtype_layer
Return
Applicative
Origial documentation for Builder.as_dtype_layer
def as_dtype_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.as_dtype, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.as_dtype
def as_dtype(type_value):
Converts the given type_value
to a DType
.
Args:
type_value: A value that can be converted to a tf.DType
object. This may currently be a tf.DType
object, a
DataType
enum,
a string type name, or a numpy.dtype
.
Returns:
A DType
corresponding to type_value
.
Raises:
TypeError: If type_value
cannot be converted to a DType
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def as_string(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.as_string, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.as_string
Return
Applicative
Origial documentation for Builder.as_string
def as_string(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.as_string
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.as_string
def as_string(input, precision=None, scientific=None, shortest=None, width=None, fill=None, name=None)
Converts each entry in the given tensor to strings. Supports many numeric
types and boolean.
Args:
input: A Tensor
. Must be one of the following types: int32
, int64
, complex64
, float32
, float64
, bool
, int8
.
precision: An optional int
. Defaults to -1
.
The post-decimal precision to use for floating point numbers.
Only used if precision > -1.
scientific: An optional bool
. Defaults to False
.
Use scientific notation for floating point numbers.
shortest: An optional bool
. Defaults to False
.
Use shortest representation (either scientific or standard) for
floating point numbers.
width: An optional int
. Defaults to -1
.
Pad pre-decimal numbers to this width.
Applies to both floating point and integer numbers.
Only used if width > -1.
fill: An optional string
. Defaults to ""
.
The value to pad if width > -1. If empty, pads with spaces.
Another typical value is '0'. String cannot be longer than 1 character.
name: A name for the operation (optional).
Returns:
A Tensor
of type string
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def as_string_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.as_string_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.as_string_layer
Return
Applicative
Origial documentation for Builder.as_string_layer
def as_string_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.as_string, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.as_string
def as_string(input, precision=None, scientific=None, shortest=None, width=None, fill=None, name=None):
Converts each entry in the given tensor to strings. Supports many numeric
types and boolean.
Args:
input: A Tensor
. Must be one of the following types: int32
, int64
, complex64
, float32
, float64
, bool
, int8
.
precision: An optional int
. Defaults to -1
.
The post-decimal precision to use for floating point numbers.
Only used if precision > -1.
scientific: An optional bool
. Defaults to False
.
Use scientific notation for floating point numbers.
shortest: An optional bool
. Defaults to False
.
Use shortest representation (either scientific or standard) for
floating point numbers.
width: An optional int
. Defaults to -1
.
Pad pre-decimal numbers to this width.
Applies to both floating point and integer numbers.
Only used if width > -1.
fill: An optional string
. Defaults to ""
.
The value to pad if width > -1. If empty, pads with spaces.
Another typical value is '0'. String cannot be longer than 1 character.
name: A name for the operation (optional).
Returns:
A Tensor
of type string
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def asin(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.asin, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.asin
Return
Applicative
Origial documentation for Builder.asin
def asin(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.asin
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.asin
def asin(x, name=None)
Computes asin of x element-wise.
Args:
x: A Tensor
. Must be one of the following types: half
, float32
, float64
, int32
, int64
, complex64
, complex128
.
name: A name for the operation (optional).
Returns:
A Tensor
. Has the same type as x
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def asin_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.asin_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.asin_layer
Return
Applicative
Origial documentation for Builder.asin_layer
def asin_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.asin, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.asin
def asin(x, name=None):
Computes asin of x element-wise.
Args:
x: A Tensor
. Must be one of the following types: half
, float32
, float64
, int32
, int64
, complex64
, complex128
.
name: A name for the operation (optional).
Returns:
A Tensor
. Has the same type as x
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_equal(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_equal, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_equal
Return
Applicative
Origial documentation for Builder.assert_equal
def assert_equal(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assert_equal
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assert_equal
def assert_equal(x, y, data=None, summarize=None, message=None, name=None)
Assert the condition x == y
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_equal(x, y)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_equal(x, y)], x)
This condition holds if for every pair of (possibly broadcast) elements
x[i]
, y[i]
, we have x[i] == y[i]
.
If both x
and y
are empty, this is trivially satisfied.
Args:
x: Numeric Tensor
.
y: Numeric Tensor
, same dtype as and broadcastable to x
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
, y
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_equal".
Returns:
Op that raises InvalidArgumentError
if x == y
is False.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_equal_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_equal_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_equal_layer
Return
Applicative
Origial documentation for Builder.assert_equal_layer
def assert_equal_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assert_equal, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assert_equal
def assert_equal(x, y, data=None, summarize=None, message=None, name=None):
Assert the condition x == y
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_equal(x, y)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_equal(x, y)], x)
This condition holds if for every pair of (possibly broadcast) elements
x[i]
, y[i]
, we have x[i] == y[i]
.
If both x
and y
are empty, this is trivially satisfied.
Args:
x: Numeric Tensor
.
y: Numeric Tensor
, same dtype as and broadcastable to x
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
, y
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_equal".
Returns:
Op that raises InvalidArgumentError
if x == y
is False.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_greater(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_greater, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_greater
Return
Applicative
Origial documentation for Builder.assert_greater
def assert_greater(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assert_greater
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assert_greater
def assert_greater(x, y, data=None, summarize=None, message=None, name=None)
Assert the condition x > y
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_greater(x, y)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_greater(x, y)], x)
This condition holds if for every pair of (possibly broadcast) elements
x[i]
, y[i]
, we have x[i] > y[i]
.
If both x
and y
are empty, this is trivially satisfied.
Args:
x: Numeric Tensor
.
y: Numeric Tensor
, same dtype as and broadcastable to x
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
, y
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_greater".
Returns:
Op that raises InvalidArgumentError
if x > y
is False.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_greater_equal(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_greater_equal, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_greater_equal
Return
Applicative
Origial documentation for Builder.assert_greater_equal
def assert_greater_equal(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assert_greater_equal
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assert_greater_equal
def assert_greater_equal(x, y, data=None, summarize=None, message=None, name=None)
Assert the condition x >= y
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_greater_equal(x, y)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_greater_equal(x, y)], x)
This condition holds if for every pair of (possibly broadcast) elements
x[i]
, y[i]
, we have x[i] >= y[i]
.
If both x
and y
are empty, this is trivially satisfied.
Args:
x: Numeric Tensor
.
y: Numeric Tensor
, same dtype as and broadcastable to x
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
, y
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to
"assert_greater_equal"
Returns:
Op that raises InvalidArgumentError
if x >= y
is False.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_greater_equal_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_greater_equal_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_greater_equal_layer
Return
Applicative
Origial documentation for Builder.assert_greater_equal_layer
def assert_greater_equal_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assert_greater_equal, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assert_greater_equal
def assert_greater_equal(x, y, data=None, summarize=None, message=None, name=None):
Assert the condition x >= y
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_greater_equal(x, y)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_greater_equal(x, y)], x)
This condition holds if for every pair of (possibly broadcast) elements
x[i]
, y[i]
, we have x[i] >= y[i]
.
If both x
and y
are empty, this is trivially satisfied.
Args:
x: Numeric Tensor
.
y: Numeric Tensor
, same dtype as and broadcastable to x
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
, y
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to
"assert_greater_equal"
Returns:
Op that raises InvalidArgumentError
if x >= y
is False.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_greater_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_greater_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_greater_layer
Return
Applicative
Origial documentation for Builder.assert_greater_layer
def assert_greater_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assert_greater, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assert_greater
def assert_greater(x, y, data=None, summarize=None, message=None, name=None):
Assert the condition x > y
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_greater(x, y)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_greater(x, y)], x)
This condition holds if for every pair of (possibly broadcast) elements
x[i]
, y[i]
, we have x[i] > y[i]
.
If both x
and y
are empty, this is trivially satisfied.
Args:
x: Numeric Tensor
.
y: Numeric Tensor
, same dtype as and broadcastable to x
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
, y
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_greater".
Returns:
Op that raises InvalidArgumentError
if x > y
is False.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_integer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_integer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_integer
Return
Applicative
Origial documentation for Builder.assert_integer
def assert_integer(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assert_integer
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assert_integer
def assert_integer(x, message=None, name=None)
Assert that x
is of integer dtype.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_integer(x)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_integer(x)], x)
Args:
x: Tensor
whose basetype is integer and is not quantized.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_integer".
Raises:
TypeError: If x.dtype
is anything other than non-quantized integer.
Returns:
A no_op
that does nothing. Type can be determined statically.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_integer_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_integer_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_integer_layer
Return
Applicative
Origial documentation for Builder.assert_integer_layer
def assert_integer_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assert_integer, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assert_integer
def assert_integer(x, message=None, name=None):
Assert that x
is of integer dtype.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_integer(x)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_integer(x)], x)
Args:
x: Tensor
whose basetype is integer and is not quantized.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_integer".
Raises:
TypeError: If x.dtype
is anything other than non-quantized integer.
Returns:
A no_op
that does nothing. Type can be determined statically.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_less(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_less, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_less
Return
Applicative
Origial documentation for Builder.assert_less
def assert_less(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assert_less
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assert_less
def assert_less(x, y, data=None, summarize=None, message=None, name=None)
Assert the condition x < y
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_less(x, y)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_less(x, y)], x)
This condition holds if for every pair of (possibly broadcast) elements
x[i]
, y[i]
, we have x[i] < y[i]
.
If both x
and y
are empty, this is trivially satisfied.
Args:
x: Numeric Tensor
.
y: Numeric Tensor
, same dtype as and broadcastable to x
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
, y
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_less".
Returns:
Op that raises InvalidArgumentError
if x < y
is False.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_less_equal(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_less_equal, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_less_equal
Return
Applicative
Origial documentation for Builder.assert_less_equal
def assert_less_equal(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assert_less_equal
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assert_less_equal
def assert_less_equal(x, y, data=None, summarize=None, message=None, name=None)
Assert the condition x <= y
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_less_equal(x, y)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_less_equal(x, y)], x)
This condition holds if for every pair of (possibly broadcast) elements
x[i]
, y[i]
, we have x[i] <= y[i]
.
If both x
and y
are empty, this is trivially satisfied.
Args:
x: Numeric Tensor
.
y: Numeric Tensor
, same dtype as and broadcastable to x
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
, y
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_less_equal"
Returns:
Op that raises InvalidArgumentError
if x <= y
is False.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_less_equal_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_less_equal_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_less_equal_layer
Return
Applicative
Origial documentation for Builder.assert_less_equal_layer
def assert_less_equal_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assert_less_equal, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assert_less_equal
def assert_less_equal(x, y, data=None, summarize=None, message=None, name=None):
Assert the condition x <= y
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_less_equal(x, y)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_less_equal(x, y)], x)
This condition holds if for every pair of (possibly broadcast) elements
x[i]
, y[i]
, we have x[i] <= y[i]
.
If both x
and y
are empty, this is trivially satisfied.
Args:
x: Numeric Tensor
.
y: Numeric Tensor
, same dtype as and broadcastable to x
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
, y
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_less_equal"
Returns:
Op that raises InvalidArgumentError
if x <= y
is False.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_less_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_less_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_less_layer
Return
Applicative
Origial documentation for Builder.assert_less_layer
def assert_less_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assert_less, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assert_less
def assert_less(x, y, data=None, summarize=None, message=None, name=None):
Assert the condition x < y
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_less(x, y)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_less(x, y)], x)
This condition holds if for every pair of (possibly broadcast) elements
x[i]
, y[i]
, we have x[i] < y[i]
.
If both x
and y
are empty, this is trivially satisfied.
Args:
x: Numeric Tensor
.
y: Numeric Tensor
, same dtype as and broadcastable to x
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
, y
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_less".
Returns:
Op that raises InvalidArgumentError
if x < y
is False.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_negative(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_negative, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_negative
Return
Applicative
Origial documentation for Builder.assert_negative
def assert_negative(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assert_negative
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assert_negative
def assert_negative(x, data=None, summarize=None, message=None, name=None)
Assert the condition x < 0
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_negative(x)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_negative(x)], x)
Negative means, for every element x[i]
of x
, we have x[i] < 0
.
If x
is empty this is trivially satisfied.
Args:
x: Numeric Tensor
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_negative".
Returns:
Op raising InvalidArgumentError
unless x
is all negative.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_negative_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_negative_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_negative_layer
Return
Applicative
Origial documentation for Builder.assert_negative_layer
def assert_negative_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assert_negative, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assert_negative
def assert_negative(x, data=None, summarize=None, message=None, name=None):
Assert the condition x < 0
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_negative(x)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_negative(x)], x)
Negative means, for every element x[i]
of x
, we have x[i] < 0
.
If x
is empty this is trivially satisfied.
Args:
x: Numeric Tensor
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_negative".
Returns:
Op raising InvalidArgumentError
unless x
is all negative.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_non_negative(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_non_negative, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_non_negative
Return
Applicative
Origial documentation for Builder.assert_non_negative
def assert_non_negative(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assert_non_negative
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assert_non_negative
def assert_non_negative(x, data=None, summarize=None, message=None, name=None)
Assert the condition x >= 0
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_non_negative(x)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_non_negative(x)], x)
Non-negative means, for every element x[i]
of x
, we have x[i] >= 0
.
If x
is empty this is trivially satisfied.
Args:
x: Numeric Tensor
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional).
Defaults to "assert_non_negative".
Returns:
Op raising InvalidArgumentError
unless x
is all non-negative.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_non_negative_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_non_negative_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_non_negative_layer
Return
Applicative
Origial documentation for Builder.assert_non_negative_layer
def assert_non_negative_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assert_non_negative, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assert_non_negative
def assert_non_negative(x, data=None, summarize=None, message=None, name=None):
Assert the condition x >= 0
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_non_negative(x)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_non_negative(x)], x)
Non-negative means, for every element x[i]
of x
, we have x[i] >= 0
.
If x
is empty this is trivially satisfied.
Args:
x: Numeric Tensor
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional).
Defaults to "assert_non_negative".
Returns:
Op raising InvalidArgumentError
unless x
is all non-negative.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_non_positive(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_non_positive, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_non_positive
Return
Applicative
Origial documentation for Builder.assert_non_positive
def assert_non_positive(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assert_non_positive
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assert_non_positive
def assert_non_positive(x, data=None, summarize=None, message=None, name=None)
Assert the condition x <= 0
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_non_positive(x)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_non_positive(x)], x)
Non-positive means, for every element x[i]
of x
, we have x[i] <= 0
.
If x
is empty this is trivially satisfied.
Args:
x: Numeric Tensor
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional).
Defaults to "assert_non_positive".
Returns:
Op raising InvalidArgumentError
unless x
is all non-positive.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_non_positive_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_non_positive_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_non_positive_layer
Return
Applicative
Origial documentation for Builder.assert_non_positive_layer
def assert_non_positive_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assert_non_positive, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assert_non_positive
def assert_non_positive(x, data=None, summarize=None, message=None, name=None):
Assert the condition x <= 0
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_non_positive(x)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_non_positive(x)], x)
Non-positive means, for every element x[i]
of x
, we have x[i] <= 0
.
If x
is empty this is trivially satisfied.
Args:
x: Numeric Tensor
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional).
Defaults to "assert_non_positive".
Returns:
Op raising InvalidArgumentError
unless x
is all non-positive.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_positive(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_positive, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_positive
Return
Applicative
Origial documentation for Builder.assert_positive
def assert_positive(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assert_positive
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assert_positive
def assert_positive(x, data=None, summarize=None, message=None, name=None)
Assert the condition x > 0
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_positive(x)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_positive(x)], x)
Positive means, for every element x[i]
of x
, we have x[i] > 0
.
If x
is empty this is trivially satisfied.
Args:
x: Numeric Tensor
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_positive".
Returns:
Op raising InvalidArgumentError
unless x
is all positive.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_positive_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_positive_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_positive_layer
Return
Applicative
Origial documentation for Builder.assert_positive_layer
def assert_positive_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assert_positive, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assert_positive
def assert_positive(x, data=None, summarize=None, message=None, name=None):
Assert the condition x > 0
holds element-wise.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_positive(x)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_positive(x)], x)
Positive means, for every element x[i]
of x
, we have x[i] > 0
.
If x
is empty this is trivially satisfied.
Args:
x: Numeric Tensor
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_positive".
Returns:
Op raising InvalidArgumentError
unless x
is all positive.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_proper_iterable(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_proper_iterable, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_proper_iterable
Return
Applicative
Origial documentation for Builder.assert_proper_iterable
def assert_proper_iterable(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assert_proper_iterable
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assert_proper_iterable
def assert_proper_iterable(values)
Static assert that values is a "proper" iterable.
Ops
that expect iterables of Tensor
can call this to validate input.
Useful since Tensor
, ndarray
, byte/text type are all iterables themselves.
Args: values: Object to be checked.
Raises:
TypeError: If values
is not iterable or is one of
Tensor
, SparseTensor
, np.array
, tf.compat.bytes_or_text_types
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_proper_iterable_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_proper_iterable_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_proper_iterable_layer
Return
Applicative
Origial documentation for Builder.assert_proper_iterable_layer
def assert_proper_iterable_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assert_proper_iterable, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assert_proper_iterable
def assert_proper_iterable(values):
Static assert that values is a "proper" iterable.
Ops
that expect iterables of Tensor
can call this to validate input.
Useful since Tensor
, ndarray
, byte/text type are all iterables themselves.
Args: values: Object to be checked.
Raises:
TypeError: If values
is not iterable or is one of
Tensor
, SparseTensor
, np.array
, tf.compat.bytes_or_text_types
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_rank(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_rank, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_rank
Return
Applicative
Origial documentation for Builder.assert_rank
def assert_rank(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assert_rank
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assert_rank
def assert_rank(x, rank, data=None, summarize=None, message=None, name=None)
Assert x
has rank equal to rank
.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_rank(x, 2)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_rank(x, 2)], x)
Args:
x: Numeric Tensor
.
rank: Scalar integer Tensor
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_rank".
Returns:
Op raising InvalidArgumentError
unless x
has specified rank.
If static checks determine x
has correct rank, a no_op
is returned.
Raises:
ValueError: If static checks determine x
has wrong rank.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_rank_at_least(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_rank_at_least, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_rank_at_least
Return
Applicative
Origial documentation for Builder.assert_rank_at_least
def assert_rank_at_least(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assert_rank_at_least
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assert_rank_at_least
def assert_rank_at_least(x, rank, data=None, summarize=None, message=None, name=None)
Assert x
has rank equal to rank
or higher.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_rank_at_least(x, 2)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_rank_at_least(x, 2)], x)
Args:
x: Numeric Tensor
.
rank: Scalar Tensor
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional).
Defaults to "assert_rank_at_least".
Returns:
Op raising InvalidArgumentError
unless x
has specified rank or higher.
If static checks determine x
has correct rank, a no_op
is returned.
Raises:
ValueError: If static checks determine x
has wrong rank.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_rank_at_least_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_rank_at_least_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_rank_at_least_layer
Return
Applicative
Origial documentation for Builder.assert_rank_at_least_layer
def assert_rank_at_least_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assert_rank_at_least, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assert_rank_at_least
def assert_rank_at_least(x, rank, data=None, summarize=None, message=None, name=None):
Assert x
has rank equal to rank
or higher.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_rank_at_least(x, 2)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_rank_at_least(x, 2)], x)
Args:
x: Numeric Tensor
.
rank: Scalar Tensor
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional).
Defaults to "assert_rank_at_least".
Returns:
Op raising InvalidArgumentError
unless x
has specified rank or higher.
If static checks determine x
has correct rank, a no_op
is returned.
Raises:
ValueError: If static checks determine x
has wrong rank.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_rank_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_rank_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_rank_layer
Return
Applicative
Origial documentation for Builder.assert_rank_layer
def assert_rank_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assert_rank, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assert_rank
def assert_rank(x, rank, data=None, summarize=None, message=None, name=None):
Assert x
has rank equal to rank
.
Example of adding a dependency to an operation:
python
with tf.control_dependencies([tf.assert_rank(x, 2)]):
output = tf.reduce_sum(x)
Example of adding dependency to the tensor being checked:
python
x = tf.with_dependencies([tf.assert_rank(x, 2)], x)
Args:
x: Numeric Tensor
.
rank: Scalar integer Tensor
.
data: The tensors to print out if the condition is False. Defaults to
error message and first few entries of x
.
summarize: Print this many entries of each tensor.
message: A string to prefix to the default message.
name: A name for this operation (optional). Defaults to "assert_rank".
Returns:
Op raising InvalidArgumentError
unless x
has specified rank.
If static checks determine x
has correct rank, a no_op
is returned.
Raises:
ValueError: If static checks determine x
has wrong rank.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_type(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_type, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_type
Return
Applicative
Origial documentation for Builder.assert_type
def assert_type(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assert_type
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assert_type
def assert_type(tensor, tf_type, message=None, name=None)
Statically asserts that the given Tensor
is of the specified type.
Args:
tensor: A tensorflow Tensor
.
tf_type: A tensorflow type (dtypes.float32, tf.int64, dtypes.bool, etc).
message: A string to prefix to the default message.
name: A name to give this Op
. Defaults to "assert_type"
Raises: TypeError: If the tensors data type doesn't match tf_type.
Returns:
A no_op
that does nothing. Type can be determined statically.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_type_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_type_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_type_layer
Return
Applicative
Origial documentation for Builder.assert_type_layer
def assert_type_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assert_type, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assert_type
def assert_type(tensor, tf_type, message=None, name=None):
Statically asserts that the given Tensor
is of the specified type.
Args:
tensor: A tensorflow Tensor
.
tf_type: A tensorflow type (dtypes.float32, tf.int64, dtypes.bool, etc).
message: A string to prefix to the default message.
name: A name to give this Op
. Defaults to "assert_type"
Raises: TypeError: If the tensors data type doesn't match tf_type.
Returns:
A no_op
that does nothing. Type can be determined statically.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_variables_initialized(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_variables_initialized, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_variables_initialized
Return
Applicative
Origial documentation for Builder.assert_variables_initialized
def assert_variables_initialized(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assert_variables_initialized
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assert_variables_initialized
def assert_variables_initialized(var_list=None)
Returns an Op to check if variables are initialized.
NOTE: This function is obsolete and will be removed in 6 months. Please
change your implementation to use report_uninitialized_variables()
.
When run, the returned Op will raise the exception FailedPreconditionError
if any of the variables has not yet been initialized.
Note: This function is implemented by trying to fetch the values of the variables. If one of the variables is not initialized a message may be logged by the C++ runtime. This is expected.
Args:
var_list: List of Variable
objects to check. Defaults to the
value of all_variables().
Returns: An Op, or None if there are no variables.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assert_variables_initialized_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assert_variables_initialized_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assert_variables_initialized_layer
Return
Applicative
Origial documentation for Builder.assert_variables_initialized_layer
def assert_variables_initialized_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assert_variables_initialized, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assert_variables_initialized
def assert_variables_initialized(var_list=None):
Returns an Op to check if variables are initialized.
NOTE: This function is obsolete and will be removed in 6 months. Please
change your implementation to use report_uninitialized_variables()
.
When run, the returned Op will raise the exception FailedPreconditionError
if any of the variables has not yet been initialized.
Note: This function is implemented by trying to fetch the values of the variables. If one of the variables is not initialized a message may be logged by the C++ runtime. This is expected.
Args:
var_list: List of Variable
objects to check. Defaults to the
value of all_variables().
Returns: An Op, or None if there are no variables.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assign(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assign, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assign
Return
Applicative
Origial documentation for Builder.assign
def assign(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assign
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assign
def assign(ref, value, validate_shape=None, use_locking=None, name=None)
Update 'ref' by assigning 'value' to it.
This operation outputs "ref" after the assignment is done. This makes it easier to chain operations that need to use the reset value.
Args:
ref: A mutable Tensor
.
Should be from a Variable
node. May be uninitialized.
value: A Tensor
. Must have the same type as ref
.
The value to be assigned to the variable.
validate_shape: An optional bool
. Defaults to True
.
If true, the operation will validate that the shape
of 'value' matches the shape of the Tensor being assigned to. If false,
'ref' will take on the shape of 'value'.
use_locking: An optional bool
. Defaults to True
.
If True, the assignment will be protected by a lock;
otherwise the behavior is undefined, but may exhibit less contention.
name: A name for the operation (optional).
Returns: Same as "ref". Returned as a convenience for operations that want to use the new value after the variable has been reset.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assign_add(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assign_add, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assign_add
Return
Applicative
Origial documentation for Builder.assign_add
def assign_add(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assign_add
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assign_add
def assign_add(ref, value, use_locking=None, name=None)
Update 'ref' by adding 'value' to it.
This operation outputs "ref" after the update is done. This makes it easier to chain operations that need to use the reset value.
Args:
ref: A mutable Tensor
. Must be one of the following types: float32
, float64
, int64
, int32
, uint8
, uint16
, int16
, int8
, complex64
, complex128
, qint8
, quint8
, qint32
, half
.
Should be from a Variable
node.
value: A Tensor
. Must have the same type as ref
.
The value to be added to the variable.
use_locking: An optional bool
. Defaults to False
.
If True, the addition will be protected by a lock;
otherwise the behavior is undefined, but may exhibit less contention.
name: A name for the operation (optional).
Returns: Same as "ref". Returned as a convenience for operations that want to use the new value after the variable has been updated.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assign_add_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assign_add_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assign_add_layer
Return
Applicative
Origial documentation for Builder.assign_add_layer
def assign_add_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assign_add, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assign_add
def assign_add(ref, value, use_locking=None, name=None):
Update 'ref' by adding 'value' to it.
This operation outputs "ref" after the update is done. This makes it easier to chain operations that need to use the reset value.
Args:
ref: A mutable Tensor
. Must be one of the following types: float32
, float64
, int64
, int32
, uint8
, uint16
, int16
, int8
, complex64
, complex128
, qint8
, quint8
, qint32
, half
.
Should be from a Variable
node.
value: A Tensor
. Must have the same type as ref
.
The value to be added to the variable.
use_locking: An optional bool
. Defaults to False
.
If True, the addition will be protected by a lock;
otherwise the behavior is undefined, but may exhibit less contention.
name: A name for the operation (optional).
Returns: Same as "ref". Returned as a convenience for operations that want to use the new value after the variable has been updated.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assign_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assign_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assign_layer
Return
Applicative
Origial documentation for Builder.assign_layer
def assign_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assign, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assign
def assign(ref, value, validate_shape=None, use_locking=None, name=None):
Update 'ref' by assigning 'value' to it.
This operation outputs "ref" after the assignment is done. This makes it easier to chain operations that need to use the reset value.
Args:
ref: A mutable Tensor
.
Should be from a Variable
node. May be uninitialized.
value: A Tensor
. Must have the same type as ref
.
The value to be assigned to the variable.
validate_shape: An optional bool
. Defaults to True
.
If true, the operation will validate that the shape
of 'value' matches the shape of the Tensor being assigned to. If false,
'ref' will take on the shape of 'value'.
use_locking: An optional bool
. Defaults to True
.
If True, the assignment will be protected by a lock;
otherwise the behavior is undefined, but may exhibit less contention.
name: A name for the operation (optional).
Returns: Same as "ref". Returned as a convenience for operations that want to use the new value after the variable has been reset.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assign_sub(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assign_sub, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assign_sub
Return
Applicative
Origial documentation for Builder.assign_sub
def assign_sub(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.assign_sub
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.assign_sub
def assign_sub(ref, value, use_locking=None, name=None)
Update 'ref' by subtracting 'value' from it.
This operation outputs "ref" after the update is done. This makes it easier to chain operations that need to use the reset value.
Args:
ref: A mutable Tensor
. Must be one of the following types: float32
, float64
, int64
, int32
, uint8
, uint16
, int16
, int8
, complex64
, complex128
, qint8
, quint8
, qint32
, half
.
Should be from a Variable
node.
value: A Tensor
. Must have the same type as ref
.
The value to be subtracted to the variable.
use_locking: An optional bool
. Defaults to False
.
If True, the subtraction will be protected by a lock;
otherwise the behavior is undefined, but may exhibit less contention.
name: A name for the operation (optional).
Returns: Same as "ref". Returned as a convenience for operations that want to use the new value after the variable has been updated.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def assign_sub_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.assign_sub_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.assign_sub_layer
Return
Applicative
Origial documentation for Builder.assign_sub_layer
def assign_sub_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.assign_sub, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.assign_sub
def assign_sub(ref, value, use_locking=None, name=None):
Update 'ref' by subtracting 'value' from it.
This operation outputs "ref" after the update is done. This makes it easier to chain operations that need to use the reset value.
Args:
ref: A mutable Tensor
. Must be one of the following types: float32
, float64
, int64
, int32
, uint8
, uint16
, int16
, int8
, complex64
, complex128
, qint8
, quint8
, qint32
, half
.
Should be from a Variable
node.
value: A Tensor
. Must have the same type as ref
.
The value to be subtracted to the variable.
use_locking: An optional bool
. Defaults to False
.
If True, the subtraction will be protected by a lock;
otherwise the behavior is undefined, but may exhibit less contention.
name: A name for the operation (optional).
Returns: Same as "ref". Returned as a convenience for operations that want to use the new value after the variable has been updated.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def atan(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.atan, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.atan
Return
Applicative
Origial documentation for Builder.atan
def atan(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.atan
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.atan
def atan(x, name=None)
Computes atan of x element-wise.
Args:
x: A Tensor
. Must be one of the following types: half
, float32
, float64
, int32
, int64
, complex64
, complex128
.
name: A name for the operation (optional).
Returns:
A Tensor
. Has the same type as x
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def atan_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.atan_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.atan_layer
Return
Applicative
Origial documentation for Builder.atan_layer
def atan_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.atan, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.atan
def atan(x, name=None):
Computes atan of x element-wise.
Args:
x: A Tensor
. Must be one of the following types: half
, float32
, float64
, int32
, int64
, complex64
, complex128
.
name: A name for the operation (optional).
Returns:
A Tensor
. Has the same type as x
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def atrous_conv2d(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.atrous_conv2d, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.atrous_conv2d
Return
Applicative
Origial documentation for Builder.atrous_conv2d
def atrous_conv2d(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.nn.atrous_conv2d
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.nn.atrous_conv2d
def atrous_conv2d(value, filters, rate, padding, name=None)
Atrous convolution (a.k.a. convolution with holes or dilated convolution).
Computes a 2-D atrous convolution, also known as convolution with holes or
dilated convolution, given 4-D value
and filters
tensors. If the rate
parameter is equal to one, it performs regular 2-D convolution. If the rate
parameter is greater than one, it performs convolution with holes, sampling
the input values every rate
pixels in the height
and width
dimensions.
This is equivalent to convolving the input with a set of upsampled filters,
produced by inserting rate - 1
zeros between two consecutive values of the
filters along the height
and width
dimensions, hence the name atrous
convolution or convolution with holes (the French word trous means holes in
English).
More specifically:
output[b, i, j, k] = sum_{di, dj, q} filters[di, dj, q, k] * value[b, i + rate * di, j + rate * dj, q]
Atrous convolution allows us to explicitly control how densely to compute
feature responses in fully convolutional networks. Used in conjunction with
bilinear interpolation, it offers an alternative to conv2d_transpose
in
dense prediction tasks such as semantic image segmentation, optical flow
computation, or depth estimation. It also allows us to effectively enlarge
the field of view of filters without increasing the number of parameters or
the amount of computation.
For a description of atrous convolution and how it can be used for dense feature extraction, please see: Semantic Image Segmentation with Deep Convolutional Nets and Fully Connected CRFs. The same operation is investigated further in Multi-Scale Context Aggregation by Dilated Convolutions. Previous works that effectively use atrous convolution in different ways are, among others, OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks and [Fast Image Scanning with Deep Max-Pooling Convolutional Neural Networks] (http://arxiv.org/abs/1302.1700). Atrous convolution is also closely related to the so-called noble identities in multi-rate signal processing.
There are many different ways to implement atrous convolution (see the refs above). The implementation here reduces
atrous_conv2d(value, filters, rate, padding=padding)
to the following three operations:
paddings = ... net = space_to_batch(value, paddings, block_size=rate) net = conv2d(net, filters, strides=[1, 1, 1, 1], padding="VALID") crops = ... net = batch_to_space(net, crops, block_size=rate)
Advanced usage. Note the following optimization: A sequence of atrous_conv2d
operations with identical rate
parameters, 'SAME' padding
, and filters
with odd heights/ widths:
net = atrous_conv2d(net, filters1, rate, padding="SAME") net = atrous_conv2d(net, filters2, rate, padding="SAME") ... net = atrous_conv2d(net, filtersK, rate, padding="SAME")
can be equivalently performed cheaper in terms of computation and memory as:
pad = ... # padding so that the input dims are multiples of rate net = space_to_batch(net, paddings=pad, block_size=rate) net = conv2d(net, filters1, strides=[1, 1, 1, 1], padding="SAME") net = conv2d(net, filters2, strides=[1, 1, 1, 1], padding="SAME") ... net = conv2d(net, filtersK, strides=[1, 1, 1, 1], padding="SAME") net = batch_to_space(net, crops=pad, block_size=rate)
because a pair of consecutive space_to_batch
and batch_to_space
ops with
the same block_size
cancel out when their respective paddings
and crops
inputs are identical.
Args:
value: A 4-D Tensor
of type float
. It needs to be in the default "NHWC"
format. Its shape is [batch, in_height, in_width, in_channels]
.
filters: A 4-D Tensor
with the same type as value
and shape
[filter_height, filter_width, in_channels, out_channels]
. filters
'
in_channels
dimension must match that of value
. Atrous convolution is
equivalent to standard convolution with upsampled filters with effective
height filter_height + (filter_height - 1) * (rate - 1)
and effective
width filter_width + (filter_width - 1) * (rate - 1)
, produced by
inserting rate - 1
zeros along consecutive elements across the
filters
' spatial dimensions.
rate: A positive int32. The stride with which we sample input values across
the height
and width
dimensions. Equivalently, the rate by which we
upsample the filter values by inserting zeros across the height
and
width
dimensions. In the literature, the same parameter is sometimes
called input stride
or dilation
.
padding: A string, either 'VALID'
or 'SAME'
. The padding algorithm.
name: Optional name for the returned tensor.
Returns:
A Tensor
with the same type as value
.
Raises:
ValueError: If input/output depth does not match filters
' shape, or if
padding is other than 'VALID'
or 'SAME'
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def atrous_conv2d_layer(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.atrous_conv2d_layer, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.atrous_conv2d_layer
Return
Applicative
Origial documentation for Builder.atrous_conv2d_layer
def atrous_conv2d_layer(builder, size):
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .fully_connected(size, activation_fn = tf.nn.atrous_conv2d, ...)
Arguments
size
: the size of the resulting layer- All other *args and **kwargs are forwarded to
tf.contrib.layers.fully_connected
Return
Builder
Origial documentation for tf.nn.atrous_conv2d
def atrous_conv2d(value, filters, rate, padding, name=None):
Atrous convolution (a.k.a. convolution with holes or dilated convolution).
Computes a 2-D atrous convolution, also known as convolution with holes or
dilated convolution, given 4-D value
and filters
tensors. If the rate
parameter is equal to one, it performs regular 2-D convolution. If the rate
parameter is greater than one, it performs convolution with holes, sampling
the input values every rate
pixels in the height
and width
dimensions.
This is equivalent to convolving the input with a set of upsampled filters,
produced by inserting rate - 1
zeros between two consecutive values of the
filters along the height
and width
dimensions, hence the name atrous
convolution or convolution with holes (the French word trous means holes in
English).
More specifically:
output[b, i, j, k] = sum_{di, dj, q} filters[di, dj, q, k] * value[b, i + rate * di, j + rate * dj, q]
Atrous convolution allows us to explicitly control how densely to compute
feature responses in fully convolutional networks. Used in conjunction with
bilinear interpolation, it offers an alternative to conv2d_transpose
in
dense prediction tasks such as semantic image segmentation, optical flow
computation, or depth estimation. It also allows us to effectively enlarge
the field of view of filters without increasing the number of parameters or
the amount of computation.
For a description of atrous convolution and how it can be used for dense feature extraction, please see: Semantic Image Segmentation with Deep Convolutional Nets and Fully Connected CRFs. The same operation is investigated further in Multi-Scale Context Aggregation by Dilated Convolutions. Previous works that effectively use atrous convolution in different ways are, among others, OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks and [Fast Image Scanning with Deep Max-Pooling Convolutional Neural Networks] (http://arxiv.org/abs/1302.1700). Atrous convolution is also closely related to the so-called noble identities in multi-rate signal processing.
There are many different ways to implement atrous convolution (see the refs above). The implementation here reduces
atrous_conv2d(value, filters, rate, padding=padding)
to the following three operations:
paddings = ... net = space_to_batch(value, paddings, block_size=rate) net = conv2d(net, filters, strides=[1, 1, 1, 1], padding="VALID") crops = ... net = batch_to_space(net, crops, block_size=rate)
Advanced usage. Note the following optimization: A sequence of atrous_conv2d
operations with identical rate
parameters, 'SAME' padding
, and filters
with odd heights/ widths:
net = atrous_conv2d(net, filters1, rate, padding="SAME") net = atrous_conv2d(net, filters2, rate, padding="SAME") ... net = atrous_conv2d(net, filtersK, rate, padding="SAME")
can be equivalently performed cheaper in terms of computation and memory as:
pad = ... # padding so that the input dims are multiples of rate net = space_to_batch(net, paddings=pad, block_size=rate) net = conv2d(net, filters1, strides=[1, 1, 1, 1], padding="SAME") net = conv2d(net, filters2, strides=[1, 1, 1, 1], padding="SAME") ... net = conv2d(net, filtersK, strides=[1, 1, 1, 1], padding="SAME") net = batch_to_space(net, crops=pad, block_size=rate)
because a pair of consecutive space_to_batch
and batch_to_space
ops with
the same block_size
cancel out when their respective paddings
and crops
inputs are identical.
Args:
value: A 4-D Tensor
of type float
. It needs to be in the default "NHWC"
format. Its shape is [batch, in_height, in_width, in_channels]
.
filters: A 4-D Tensor
with the same type as value
and shape
[filter_height, filter_width, in_channels, out_channels]
. filters
'
in_channels
dimension must match that of value
. Atrous convolution is
equivalent to standard convolution with upsampled filters with effective
height filter_height + (filter_height - 1) * (rate - 1)
and effective
width filter_width + (filter_width - 1) * (rate - 1)
, produced by
inserting rate - 1
zeros along consecutive elements across the
filters
' spatial dimensions.
rate: A positive int32. The stride with which we sample input values across
the height
and width
dimensions. Equivalently, the rate by which we
upsample the filter values by inserting zeros across the height
and
width
dimensions. In the literature, the same parameter is sometimes
called input stride
or dilation
.
padding: A string, either 'VALID'
or 'SAME'
. The padding algorithm.
name: Optional name for the returned tensor.
Returns:
A Tensor
with the same type as value
.
Raises:
ValueError: If input/output depth does not match filters
' shape, or if
padding is other than 'VALID'
or 'SAME'
.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def audio_summary(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.audio_summary, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.audio_summary
Return
Applicative
Origial documentation for Builder.audio_summary
def audio_summary(builder, tag):
THIS METHOD IS AUTOMATICALLY GENERATED
Same as tf.audio_summary(tag, tensor, sample_rate, max_outputs=3, collections=None, name=None)
but the the with the summery tensor as its first parameter.
Return
Builder
Origial documentation for tf.audio_summary
def audio_summary(tag, tensor, sample_rate, max_outputs=3, collections=None, name=None):
Outputs a Summary
protocol buffer with audio.
The summary has up to max_outputs
summary values containing audio. The
audio is built from tensor
which must be 3-D with shape [batch_size,
frames, channels]
or 2-D with shape [batch_size, frames]
. The values are
assumed to be in the range of [-1.0, 1.0]
with a sample rate of
sample_rate
.
The tag
argument is a scalar Tensor
of type string
. It is used to
build the tag
of the summary values:
- If
max_outputs
is 1, the summary value tag is 'tag/audio'. - If
max_outputs
is greater than 1, the summary value tags are generated sequentially as 'tag/audio/0', 'tag/audio/1', etc.
Args:
tag: A scalar Tensor
of type string
. Used to build the tag
of the summary values.
tensor: A 3-D float32
Tensor
of shape [batch_size, frames, channels]
or a 2-D float32
Tensor
of shape [batch_size, frames]
.
sample_rate: The sample rate of the signal in hertz.
max_outputs: Max number of batch elements to generate audio for.
collections: Optional list of ops.GraphKeys. The collections to add the
summary to. Defaults to [ops.GraphKeys.SUMMARIES]
name: A name for the operation (optional).
Returns:
A scalar Tensor
of type string
. The serialized Summary
protocol
buffer.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def avg_pool(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.avg_pool, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.avg_pool
Return
Applicative
Origial documentation for Builder.avg_pool
def avg_pool(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.nn.avg_pool
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.nn.avg_pool
def avg_pool(value, ksize, strides, padding, data_format="NHWC", name=None)
Performs the average pooling on the input.
Each entry in output
is the mean of the corresponding size ksize
window in value
.
Args:
value: A 4-D Tensor
of shape [batch, height, width, channels]
and type
float32
, float64
, qint8
, quint8
, or qint32
.
ksize: A list of ints that has length >= 4.
The size of the window for each dimension of the input tensor.
strides: A list of ints that has length >= 4.
The stride of the sliding window for each dimension of the
input tensor.
padding: A string, either 'VALID'
or 'SAME'
. The padding algorithm.
See the comment here
data_format: A string. 'NHWC' and 'NCHW' are supported.
name: Optional name for the operation.
Returns:
A Tensor
with the same type as value
. The average pooled output tensor.
def _method(app, *args, **kwargs): def _lambda(builder): g = getattr(builder, f.__name__) return g(*args, **kwargs) return app.compose(_lambda)
def avg_pool3d(
app, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
Alias for .compose(Builder.avg_pool3d, ...)
Arguments
- All other *args and **kwargs are forwarded to
Builder.avg_pool3d
Return
Applicative
Origial documentation for Builder.avg_pool3d
def avg_pool3d(builder):
THIS METHOD IS AUTOMATICALLY GENERATED
@immutable
This method is a lifted version the function tf.nn.avg_pool3d
to work with tensorbuilder.core.builders.Builder
s. Instead of taking a Tensor as its first argument it takes a builder, the rest of the arguments are exactly the same.
Original Documentation for tf.nn.avg_pool3d