neulab/docprompting-conala huggingface dataset:
tf.compat.v1.assert_negative Assert the condition x < 0 holds element-wise.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.debugging.assert_negative  
tf.compat.v1.assert_negative(
    x, data=None, summarize=None, message=None, name=None
)
 When running in graph mode, you should add a dependency on this operation to ensure that it runs. Example of adding a dependency to an operation: with tf.control_dependencies([tf.debugging.assert_negative(x, y)]):
  output = tf.reduce_sum(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 that raises InvalidArgumentError if x < 0 is False.  

 


 Raises
  InvalidArgumentError   if the check can be performed immediately and x < 0 is False. The check can be performed immediately during eager execution or if x is statically known.    Eager Compatibility returns None
tf.compat.v1.assert_none_equal Assert the condition x != y holds element-wise.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.debugging.assert_none_equal  
tf.compat.v1.assert_none_equal(
    x, y, data=None, summarize=None, message=None, name=None
)
 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. When running in graph mode, you should add a dependency on this operation to ensure that it runs. Example of adding a dependency to an operation: with tf.control_dependencies([tf.compat.v1.assert_none_equal(x, y)]):
  output = tf.reduce_sum(x)

 


 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_none_equal".   
 


 Returns   Op that raises InvalidArgumentError if x != y is False.  

 


 Raises
  InvalidArgumentError   if the check can be performed immediately and x != y is False. The check can be performed immediately during eager execution or if x and y are statically known.    Eager Compatibility returns None
tf.compat.v1.assert_non_negative Assert the condition x >= 0 holds element-wise.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.debugging.assert_non_negative  
tf.compat.v1.assert_non_negative(
    x, data=None, summarize=None, message=None, name=None
)
 When running in graph mode, you should add a dependency on this operation to ensure that it runs. Example of adding a dependency to an operation: with tf.control_dependencies([tf.debugging.assert_non_negative(x, y)]):
  output = tf.reduce_sum(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 that raises InvalidArgumentError if x >= 0 is False.  

 


 Raises
  InvalidArgumentError   if the check can be performed immediately and x >= 0 is False. The check can be performed immediately during eager execution or if x is statically known.    Eager Compatibility returns None
tf.compat.v1.assert_non_positive Assert the condition x <= 0 holds element-wise.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.debugging.assert_non_positive  
tf.compat.v1.assert_non_positive(
    x, data=None, summarize=None, message=None, name=None
)
 When running in graph mode, you should add a dependency on this operation to ensure that it runs. Example of adding a dependency to an operation: with tf.control_dependencies([tf.debugging.assert_non_positive(x, y)]):
  output = tf.reduce_sum(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 that raises InvalidArgumentError if x <= 0 is False.  

 


 Raises
  InvalidArgumentError   if the check can be performed immediately and x <= 0 is False. The check can be performed immediately during eager execution or if x is statically known.    Eager Compatibility returns None
tf.compat.v1.assert_positive Assert the condition x > 0 holds element-wise.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.debugging.assert_positive  
tf.compat.v1.assert_positive(
    x, data=None, summarize=None, message=None, name=None
)
 When running in graph mode, you should add a dependency on this operation to ensure that it runs. Example of adding a dependency to an operation: with tf.control_dependencies([tf.debugging.assert_positive(x, y)]):
  output = tf.reduce_sum(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 that raises InvalidArgumentError if x > 0 is False.  

 


 Raises
  InvalidArgumentError   if the check can be performed immediately and x > 0 is False. The check can be performed immediately during eager execution or if x is statically known.    Eager Compatibility returns None
tf.compat.v1.assert_rank Assert x has rank equal to rank.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.debugging.assert_rank  
tf.compat.v1.assert_rank(
    x, rank, data=None, summarize=None, message=None, name=None
)
 Example of adding a dependency to an operation: with tf.control_dependencies([tf.compat.v1.assert_rank(x, 2)]):
  output = tf.reduce_sum(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 the shape 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.
tf.compat.v1.assert_rank_at_least Assert x has rank equal to rank or higher.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.debugging.assert_rank_at_least  
tf.compat.v1.assert_rank_at_least(
    x, rank, data=None, summarize=None, message=None, name=None
)
 Example of adding a dependency to an operation: with tf.control_dependencies([tf.compat.v1.assert_rank_at_least(x, 2)]):
  output = tf.reduce_sum(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.
tf.compat.v1.assert_rank_in Assert x has rank in ranks.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.debugging.assert_rank_in  
tf.compat.v1.assert_rank_in(
    x, ranks, data=None, summarize=None, message=None, name=None
)
 Example of adding a dependency to an operation: with tf.control_dependencies([tf.compat.v1.assert_rank_in(x, (2, 4))]):
  output = tf.reduce_sum(x)

 


 Args
  x   Numeric Tensor.  
  ranks   Iterable of scalar Tensor objects.  
  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_in".   
 


 Returns   Op raising InvalidArgumentError unless rank of x is in ranks. If static checks determine x has matching rank, a no_op is returned.  

 


 Raises
  ValueError   If static checks determine x has mismatched rank.
tf.compat.v1.assert_scalar Asserts that the given tensor is a scalar (i.e. zero-dimensional).  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.debugging.assert_scalar  
tf.compat.v1.assert_scalar(
    tensor, name=None, message=None
)
 This function raises ValueError unless it can be certain that the given tensor is a scalar. ValueError is also raised if the shape of tensor is unknown.
 


 Args
  tensor   A Tensor.  
  name   A name for this operation. Defaults to "assert_scalar"  
  message   A string to prefix to the default message.   
 


 Returns   The input tensor (potentially converted to a Tensor).  

 


 Raises
  ValueError   If the tensor is not scalar (rank 0), or if its shape is unknown.
tf.compat.v1.assert_type Statically asserts that the given Tensor is of the specified type.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.debugging.assert_type  
tf.compat.v1.assert_type(
    tensor, tf_type, message=None, name=None
)

 


 Args
  tensor   A Tensor or SparseTensor.  
  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.
tf.compat.v1.assert_variables_initialized Returns an Op to check if variables are initialized. 
tf.compat.v1.assert_variables_initialized(
    var_list=None
)
 
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 global_variables().   
 


 Returns   An Op, or None if there are no variables.  
 
Note: The output of this function should be used. If it is not, a warning will be logged or an error may be raised. To mark the output as used, call its .mark_used() method.
tf.compat.v1.assign Update ref by assigning value to it. 
tf.compat.v1.assign(
    ref, value, validate_shape=None, use_locking=None, name=None
)
 This operation outputs a Tensor that holds the new value of ref after the value has been assigned. 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 shape and dtype 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   A Tensor that will hold the new value of ref after the assignment has completed.
tf.compat.v1.assign_add Update ref by adding value to it. 
tf.compat.v1.assign_add(
    ref, value, use_locking=None, name=None
)
 This operation outputs "ref" after the update is done. This makes it easier to chain operations that need to use the reset value. Unlike tf.math.add, this op does not broadcast. ref and value must have the same shape.
 


 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 shape and dtype 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.
tf.compat.v1.assign_sub Update ref by subtracting value from it. 
tf.compat.v1.assign_sub(
    ref, value, use_locking=None, name=None
)
 This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value. Unlike tf.math.subtract, this op does not broadcast. ref and value must have the same shape.
 


 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 shape and dtype 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.
tf.compat.v1.AttrValue A ProtocolMessage
 


 Attributes
  b   bool b  
  f   float f  
  func   NameAttrList func  
  i   int64 i  
  list   ListValue list  
  placeholder   string placeholder  
  s   bytes s  
  shape   TensorShapeProto shape  
  tensor   TensorProto tensor  
  type   DataType type    Child Classes class ListValue
tf.compat.v1.AttrValue.ListValue A ProtocolMessage
 


 Attributes
  b   repeated bool b  
  f   repeated float f  
  func   repeated NameAttrList func  
  i   repeated int64 i  
  s   repeated bytes s  
  shape   repeated TensorShapeProto shape  
  tensor   repeated TensorProto tensor  
  type   repeated DataType type
Module: tf.compat.v1.audio Public API for tf.audio namespace. Functions decode_wav(...): Decode a 16-bit PCM WAV file to a float tensor. encode_wav(...): Encode audio data using the WAV file format.
Module: tf.compat.v1.autograph Conversion of plain Python into TensorFlow graph code. 
Note: In TensorFlow 2.0, AutoGraph is automatically applied when using tf.function. This module contains lower-level APIs for advanced use.
 For more information, see the AutoGraph guide. By equivalent graph code we mean code that generates a TensorFlow graph when run. The generated graph has the same effects as the original code when executed (for example with tf.function or tf.compat.v1.Session.run). In other words, using AutoGraph can be thought of as running Python in TensorFlow. Modules experimental module: Public API for tf.autograph.experimental namespace. Functions set_verbosity(...): Sets the AutoGraph verbosity level. to_code(...): Returns the source code generated by AutoGraph, as a string. to_graph(...): Converts a Python entity into a TensorFlow graph. trace(...): Traces argument information at compilation time.
Module: tf.compat.v1.autograph.experimental Public API for tf.autograph.experimental namespace. Classes class Feature: This enumeration represents optional conversion options. Functions do_not_convert(...): Decorator that suppresses the conversion of a function. set_loop_options(...): Specifies additional arguments to be passed to the enclosing while_loop.
tf.compat.v1.autograph.to_code Returns the source code generated by AutoGraph, as a string. 
tf.compat.v1.autograph.to_code(
    entity, recursive=True, arg_values=None, arg_types=None, indentation='
    ', experimental_optional_features=None
)
 Example usage: 
def f(x):
  if x < 0:
    x = -x
  return x
tf.autograph.to_code(f)
"...def tf__f(x):..."
 Also see: tf.autograph.to_graph. 
Note: If a function has been decorated with tf.function, pass its underlying Python function, rather than the callable that `tf.function creates:
 
@tf.function
def f(x):
  if x < 0:
    x = -x
  return x
tf.autograph.to_code(f.python_function)
"...def tf__f(x):..."

 


 Args
  entity   Python callable or class.  
  recursive   Whether to recursively convert any functions that the converted function may call.  
  arg_values   Deprecated.  
  arg_types   Deprecated.  
  indentation   Deprecated.  
  experimental_optional_features   None, a tuple of, or a single tf.autograph.experimental.Feature value.   
 


 Returns   The converted code as string.
tf.compat.v1.autograph.to_graph Converts a Python entity into a TensorFlow graph. 
tf.compat.v1.autograph.to_graph(
    entity, recursive=True, arg_values=None, arg_types=None,
    experimental_optional_features=None
)
 Also see: tf.autograph.to_code, tf.function. Unlike tf.function, to_graph is a low-level transpiler that converts Python code to TensorFlow graph code. It does not implement any caching, variable management or create any actual ops, and is best used where greater control over the generated TensorFlow graph is desired. Another difference from tf.function is that to_graph will not wrap the graph into a TensorFlow function or a Python callable. Internally, tf.function uses to_graph. Example Usage def foo(x):
  if x > 0:
    y = x * x
  else:
    y = -x
  return y

converted_foo = to_graph(foo)

x = tf.constant(1)
y = converted_foo(x)  # converted_foo is a TensorFlow Op-like.
assert is_tensor(y)
 Supported Python entities include:  functions classes object methods  Functions are converted into new functions with converted code. Classes are converted by generating a new class whose methods use converted code. Methods are converted into unbound function that have an additional first argument called self.
 


 Args
  entity   Python callable or class to convert.  
  recursive   Whether to recursively convert any functions that the converted function may call.  
  arg_values   Deprecated.  
  arg_types   Deprecated.  
  experimental_optional_features   None, a tuple of, or a single tf.autograph.experimental.Feature value.   
 


 Returns   Same as entity, the converted Python function or class.  

 


 Raises
  ValueError   If the entity could not be converted.
tf.compat.v1.batch_gather Gather slices from params according to indices with leading batch dims. (deprecated) 
tf.compat.v1.batch_gather(
    params, indices, name=None
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed after 2017-10-25. Instructions for updating: tf.batch_gather is deprecated, please use tf.gather with batch_dims=-1 instead.
tf.compat.v1.batch_scatter_update Generalization of tf.compat.v1.scatter_update to axis different than 0. (deprecated) 
tf.compat.v1.batch_scatter_update(
    ref, indices, updates, use_locking=True, name=None
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed after 2018-11-29. Instructions for updating: Use the batch_scatter_update method of Variable instead. Analogous to batch_gather. This assumes that ref, indices and updates have a series of leading dimensions that are the same for all of them, and the updates are performed on the last dimension of indices. In other words, the dimensions should be the following: num_prefix_dims = indices.ndims - 1 batch_dim = num_prefix_dims + 1 updates.shape = indices.shape + var.shape[batch_dim:] where updates.shape[:num_prefix_dims] == indices.shape[:num_prefix_dims] == var.shape[:num_prefix_dims] And the operation performed can be expressed as: var[i_1, ..., i_n, indices[i_1, ..., i_n, j]] = updates[i_1, ..., i_n, j] When indices is a 1D tensor, this operation is equivalent to tf.compat.v1.scatter_update. To avoid this operation there would be 2 alternatives: 1) Reshaping the variable by merging the first ndims dimensions. However, this is not possible because tf.reshape returns a Tensor, which we cannot use tf.compat.v1.scatter_update on. 2) Looping over the first ndims of the variable and using tf.compat.v1.scatter_update on the subtensors that result of slicing the first dimension. This is a valid option for ndims = 1, but less efficient than this implementation. See also tf.compat.v1.scatter_update and tf.compat.v1.scatter_nd_update.
 


 Args
  ref   Variable to scatter onto.  
  indices   Tensor containing indices as described above.  
  updates   Tensor of updates to apply to ref.  
  use_locking   Boolean indicating whether to lock the writing operation.  
  name   Optional scope name string.   
 


 Returns   Ref to variable after it has been modified.  

 


 Raises
  ValueError   If the initial ndims of ref, indices, and updates are not the same.
tf.compat.v1.batch_to_space BatchToSpace for 4-D tensors of type T. 
tf.compat.v1.batch_to_space(
    input, crops, block_size, name=None, block_shape=None
)
 This is a legacy version of the more general BatchToSpaceND. Rearranges (permutes) data from batch into blocks of spatial data, followed by cropping. This is the reverse transformation of SpaceToBatch. More specifically, this op outputs a copy of the input tensor where values from the batch dimension are moved in spatial blocks to the height and width dimensions, followed by cropping along the height and width dimensions.
 


 Args
  input   A Tensor. 4-D tensor with shape [batch*block_size*block_size, height_pad/block_size, width_pad/block_size, depth]. Note that the batch size of the input tensor must be divisible by block_size * block_size.  
  crops   A Tensor. Must be one of the following types: int32, int64. 2-D tensor of non-negative integers with shape [2, 2]. It specifies how many elements to crop from the intermediate result across the spatial dimensions as follows: crops = [[crop_top, crop_bottom], [crop_left, crop_right]] 
 
  block_size   An int that is >= 2.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as input.