tf.test.get_temp_dir()

tf.test.get_temp_dir() Returns a temporary directory for use during tests. There is no need to delete the directory after the test. Returns: The temporary directory.

tf.test.compute_gradient_error()

tf.test.compute_gradient_error(x, x_shape, y, y_shape, x_init_value=None, delta=0.001, init_targets=None) Computes the gradient error. Computes the maximum error for dy/dx between the computed Jacobian and the numerically estimated Jacobian. This function will modify the tensors passed in as it adds more operations and hence changing the consumers of the operations of the input tensors. This function adds operations to the current session. To compute the error using a particular device, such a

tf.test.compute_gradient()

tf.test.compute_gradient(x, x_shape, y, y_shape, x_init_value=None, delta=0.001, init_targets=None) Computes and returns the theoretical and numerical Jacobian. If x or y is complex, the Jacobian will still be real but the corresponding Jacobian dimension(s) will be twice as large. This is required even if both input and output is complex since TensorFlow graphs are not necessarily holomorphic, and may have gradients not expressible as complex numbers. For example, if x is complex with shape [

tf.test.assert_equal_graph_def()

tf.test.assert_equal_graph_def(actual, expected) Asserts that two GraphDefs are (mostly) the same. Compares two GraphDef protos for equality, ignoring versions and ordering of nodes, attrs, and control inputs. Node names are used to match up nodes between the graphs, so the naming of nodes must be consistent. Args: actual: The GraphDef we have. expected: The GraphDef we expected. Raises: AssertionError: If the GraphDefs do not match. TypeError: If either argument is not a GraphDef.

tf.TensorArray.__init__()

tf.TensorArray.__init__(dtype, size=None, dynamic_size=None, clear_after_read=None, tensor_array_name=None, handle=None, flow=None, infer_shape=True, name=None) Construct a new TensorArray or wrap an existing TensorArray handle. A note about the parameter name: The name of the TensorArray (even if passed in) is uniquified: each time a new TensorArray is created at runtime it is assigned its own name for the duration of the run. This avoids name collisions if a TensorArray is created within a w

tf.TensorArray.write()

tf.TensorArray.write(index, value, name=None) Write value into index index of the TensorArray. Args: index: 0-D. int32 scalar with the index to write to. value: N-D. Tensor of type dtype. The Tensor to write to this index. name: A name for the operation (optional). Returns: A new TensorArray object with flow that ensures the write occurs. Use this object all for subsequent operations. Raises: ValueError: if there are more writers than specified.

tf.TensorArray.unpack()

tf.TensorArray.unpack(value, name=None) Pack the values of a Tensor in the TensorArray. Args: value: (N+1)-D. Tensor of type dtype. The Tensor to unpack. name: A name for the operation (optional). Returns: A new TensorArray object with flow that ensures the unpack occurs. Use this object all for subsequent operations. Raises: ValueError: if the shape inference fails.

tf.TensorArray.split()

tf.TensorArray.split(value, lengths, name=None) Split the values of a Tensor into the TensorArray. Args: value: (N+1)-D. Tensor of type dtype. The Tensor to split. lengths: 1-D. int32 vector with the lengths to use when splitting value along its first dimension. name: A name for the operation (optional). Returns: A new TensorArray object with flow that ensures the split occurs. Use this object all for subsequent operations. Raises: ValueError: if the shape inference fails.

tf.TensorArray.size()

tf.TensorArray.size(name=None) Return the size of the TensorArray.

tf.TensorArray.scatter()

tf.TensorArray.scatter(indices, value, name=None) Scatter the values of a Tensor in specific indices of a TensorArray. Args: indices: A 1-D Tensor taking values in [0, max_value). If the TensorArray is not dynamic, max_value=size(). value: (N+1)-D. Tensor of type dtype. The Tensor to unpack. name: A name for the operation (optional). Returns: A new TensorArray object with flow that ensures the scatter occurs. Use this object all for subsequent operations. Raises: ValueError: if the shape