neulab/docprompting-conala huggingface dataset:
tf.raw_ops.Minimum Returns the min of x and y (i.e. x < y ? x : y) element-wise.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.Minimum  
tf.raw_ops.Minimum(
    x, y, name=None
)
 Both inputs are number-type tensors (except complex). minimum expects that both tensors have the same dtype. Examples: 
x = tf.constant([0., 0., 0., 0.])
y = tf.constant([-5., -2., 0., 3.])
tf.math.minimum(x, y)
<tf.Tensor: shape=(4,), dtype=float32, numpy=array([-5., -2., 0., 0.], dtype=float32)>
 Note that minimum supports broadcast semantics. 
x = tf.constant([-5., 0., 0., 0.])
y = tf.constant([-3.])
tf.math.minimum(x, y)
<tf.Tensor: shape=(4,), dtype=float32, numpy=array([-5., -3., -3., -3.], dtype=float32)>
 If inputs are not tensors, they will be converted to tensors. See tf.convert_to_tensor. 
x = tf.constant([-3.], dtype=tf.float32)
tf.math.minimum([-5], x)
<tf.Tensor: shape=(1,), dtype=float32, numpy=array([-5.], dtype=float32)>

 


 Args
  x   A Tensor. Must be one of the following types: bfloat16, half, float32, float64, uint8, int16, int32, int64.  
  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.
tf.raw_ops.MirrorPad Pads a tensor with mirrored values.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MirrorPad  
tf.raw_ops.MirrorPad(
    input, paddings, mode, name=None
)
 This operation pads a input with mirrored values according to the paddings you specify. paddings is an integer tensor with shape [n, 2], where n is the rank of input. For each dimension D of input, paddings[D, 0] indicates how many values to add before the contents of input in that dimension, and paddings[D, 1] indicates how many values to add after the contents of input in that dimension. Both paddings[D, 0] and paddings[D, 1] must be no greater than input.dim_size(D) (or input.dim_size(D) - 1) if copy_border is true (if false, respectively). The padded size of each dimension D of the output is: paddings(D, 0) + input.dim_size(D) + paddings(D, 1) For example: # 't' is [[1, 2, 3], [4, 5, 6]].
# 'paddings' is [[1, 1]], [2, 2]].
# 'mode' is SYMMETRIC.
# rank of 't' is 2.
pad(t, paddings) ==> [[2, 1, 1, 2, 3, 3, 2]
                      [2, 1, 1, 2, 3, 3, 2]
                      [5, 4, 4, 5, 6, 6, 5]
                      [5, 4, 4, 5, 6, 6, 5]]

 


 Args
  input   A Tensor. The input tensor to be padded.  
  paddings   A Tensor. Must be one of the following types: int32, int64. A two-column matrix specifying the padding sizes. The number of rows must be the same as the rank of input.  
  mode   A string from: "REFLECT", "SYMMETRIC". Either REFLECT or SYMMETRIC. In reflect mode the padded regions do not include the borders, while in symmetric mode the padded regions do include the borders. For example, if input is [1, 2, 3] and paddings is [0, 2], then the output is [1, 2, 3, 2, 1] in reflect mode, and it is [1, 2, 3, 3, 2] in symmetric mode.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as input.
tf.raw_ops.MirrorPadGrad Gradient op for MirrorPad op. This op folds a mirror-padded tensor.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MirrorPadGrad  
tf.raw_ops.MirrorPadGrad(
    input, paddings, mode, name=None
)
 This operation folds the padded areas of input by MirrorPad according to the paddings you specify. paddings must be the same as paddings argument given to the corresponding MirrorPad op. The folded size of each dimension D of the output is: input.dim_size(D) - paddings(D, 0) - paddings(D, 1) For example: # 't' is [[1, 2, 3], [4, 5, 6], [7, 8, 9]].
# 'paddings' is [[0, 1]], [0, 1]].
# 'mode' is SYMMETRIC.
# rank of 't' is 2.
pad(t, paddings) ==> [[ 1,  5]
                      [11, 28]]

 


 Args
  input   A Tensor. The input tensor to be folded.  
  paddings   A Tensor. Must be one of the following types: int32, int64. A two-column matrix specifying the padding sizes. The number of rows must be the same as the rank of input.  
  mode   A string from: "REFLECT", "SYMMETRIC". The mode used in the MirrorPad op.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as input.
tf.raw_ops.Mod Returns element-wise remainder of division. This emulates C semantics in that  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.Mod  
tf.raw_ops.Mod(
    x, y, name=None
)
 the result here is consistent with a truncating divide. E.g. tf.truncatediv(x, y) * y + truncate_mod(x, y) = x. 
Note: Mod supports broadcasting. More about broadcasting here

 


 Args
  x   A Tensor. Must be one of the following types: int32, int64, half, half, bfloat16, float32, float64.  
  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.
tf.raw_ops.ModelDataset Identity transformation that models performance.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.ModelDataset  
tf.raw_ops.ModelDataset(
    input_dataset, output_types, output_shapes, algorithm=0, cpu_budget=0,
    ram_budget=0, name=None
)
 Identity transformation that models performance.
 


 Args
  input_dataset   A Tensor of type variant. A variant tensor representing the input dataset.  
  output_types   A list of tf.DTypes that has length >= 1.  
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.  
  algorithm   An optional int. Defaults to 0.  
  cpu_budget   An optional int. Defaults to 0.  
  ram_budget   An optional int. Defaults to 0.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type variant.
tf.raw_ops.Mul Returns x * y element-wise.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.Mul  
tf.raw_ops.Mul(
    x, y, name=None
)
 
Note: Multiply supports broadcasting. More about broadcasting here

 


 Args
  x   A Tensor. Must be one of the following types: bfloat16, half, float32, float64, uint8, int8, uint16, int16, int32, int64, complex64, complex128.  
  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.
tf.raw_ops.MulNoNan Returns x * y element-wise. Returns zero if y is zero, even if x if infinite or NaN.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MulNoNan  
tf.raw_ops.MulNoNan(
    x, y, name=None
)
 
Note: MulNoNan supports broadcasting. More about broadcasting here

 


 Args
  x   A Tensor. Must be one of the following types: bfloat16, half, float32, float64, complex64, complex128.  
  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.
tf.raw_ops.MultiDeviceIterator Creates a MultiDeviceIterator resource.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MultiDeviceIterator  
tf.raw_ops.MultiDeviceIterator(
    devices, shared_name, container, output_types, output_shapes, name=None
)

 


 Args
  devices   A list of strings that has length >= 1. A list of devices the iterator works across.  
  shared_name   A string. If non-empty, this resource will be shared under the given name across multiple sessions.  
  container   A string. If non-empty, this resource is placed in the given container. Otherwise, a default container is used.  
  output_types   A list of tf.DTypes that has length >= 1. The type list for the return values.  
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1. The list of shapes being produced.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type resource.
tf.raw_ops.MultiDeviceIteratorFromStringHandle Generates a MultiDeviceIterator resource from its provided string handle.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MultiDeviceIteratorFromStringHandle  
tf.raw_ops.MultiDeviceIteratorFromStringHandle(
    string_handle, output_types=[], output_shapes=[], name=None
)

 


 Args
  string_handle   A Tensor of type string. String representing the resource.  
  output_types   An optional list of tf.DTypes. Defaults to []. The type list for the return values.  
  output_shapes   An optional list of shapes (each a tf.TensorShape or list of ints). Defaults to []. The list of shapes being produced.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type resource.
tf.raw_ops.MultiDeviceIteratorGetNextFromShard Gets next element for the provided shard number.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MultiDeviceIteratorGetNextFromShard  
tf.raw_ops.MultiDeviceIteratorGetNextFromShard(
    multi_device_iterator, shard_num, incarnation_id, output_types, output_shapes,
    name=None
)

 


 Args
  multi_device_iterator   A Tensor of type resource. A MultiDeviceIterator resource.  
  shard_num   A Tensor of type int32. Integer representing which shard to fetch data for.  
  incarnation_id   A Tensor of type int64. Which incarnation of the MultiDeviceIterator is running.  
  output_types   A list of tf.DTypes that has length >= 1. The type list for the return values.  
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1. The list of shapes being produced.  
  name   A name for the operation (optional).   
 


 Returns   A list of Tensor objects of type output_types.
tf.raw_ops.MultiDeviceIteratorInit Initializes the multi device iterator with the given dataset.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MultiDeviceIteratorInit  
tf.raw_ops.MultiDeviceIteratorInit(
    dataset, multi_device_iterator, max_buffer_size, name=None
)

 


 Args
  dataset   A Tensor of type variant. Dataset to be iterated upon.  
  multi_device_iterator   A Tensor of type resource. A MultiDeviceIteratorResource.  
  max_buffer_size   A Tensor of type int64. The maximum size of the host side per device buffer to keep.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type int64.
tf.raw_ops.MultiDeviceIteratorToStringHandle Produces a string handle for the given MultiDeviceIterator.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MultiDeviceIteratorToStringHandle  
tf.raw_ops.MultiDeviceIteratorToStringHandle(
    multi_device_iterator, name=None
)

 


 Args
  multi_device_iterator   A Tensor of type resource. A MultiDeviceIterator resource.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type string.
tf.raw_ops.Multinomial Draws samples from a multinomial distribution.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.Multinomial  
tf.raw_ops.Multinomial(
    logits, num_samples, seed=0, seed2=0, output_dtype=tf.dtypes.int64, name=None
)

 


 Args
  logits   A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64. 2-D Tensor with shape [batch_size, num_classes]. Each slice [i, :] represents the unnormalized log probabilities for all classes.  
  num_samples   A Tensor of type int32. 0-D. Number of independent samples to draw for each row slice.  
  seed   An optional int. Defaults to 0. If either seed or seed2 is set to be non-zero, the internal random number generator is seeded by the given seed. Otherwise, a random seed is used.  
  seed2   An optional int. Defaults to 0. A second seed to avoid seed collision.  
  output_dtype   An optional tf.DType from: tf.int32, tf.int64. Defaults to tf.int64.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type output_dtype.
tf.raw_ops.MutableDenseHashTable Creates an empty hash table that uses tensors as the backing store.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MutableDenseHashTable  
tf.raw_ops.MutableDenseHashTable(
    empty_key, value_dtype, container='', shared_name='',
    use_node_name_sharing=False, value_shape=[], initial_num_buckets=131072,
    max_load_factor=0.8, name=None
)
 It uses "open addressing" with quadratic reprobing to resolve collisions. This op creates a mutable hash table, specifying the type of its keys and values. Each value must be a scalar. Data can be inserted into the table using the insert operations. It does not support the initialization operation.
 


 Args
  empty_key   A Tensor. The key used to represent empty key buckets internally. Must not be used in insert or lookup operations.  
  value_dtype   A tf.DType. Type of the table values.  
  container   An optional string. Defaults to "". If non-empty, this table is placed in the given container. Otherwise, a default container is used.  
  shared_name   An optional string. Defaults to "". If non-empty, this table is shared under the given name across multiple sessions.  
  use_node_name_sharing   An optional bool. Defaults to False.  
  value_shape   An optional tf.TensorShape or list of ints. Defaults to []. The shape of each value.  
  initial_num_buckets   An optional int. Defaults to 131072. The initial number of hash table buckets. Must be a power to 2.  
  max_load_factor   An optional float. Defaults to 0.8. The maximum ratio between number of entries and number of buckets before growing the table. Must be between 0 and 1.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type mutable string.
tf.raw_ops.MutableDenseHashTableV2 Creates an empty hash table that uses tensors as the backing store.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MutableDenseHashTableV2  
tf.raw_ops.MutableDenseHashTableV2(
    empty_key, deleted_key, value_dtype, container='',
    shared_name='', use_node_name_sharing=False, value_shape=[],
    initial_num_buckets=131072, max_load_factor=0.8, name=None
)
 It uses "open addressing" with quadratic reprobing to resolve collisions. This op creates a mutable hash table, specifying the type of its keys and values. Each value must be a scalar. Data can be inserted into the table using the insert operations. It does not support the initialization operation.
 


 Args
  empty_key   A Tensor. The key used to represent empty key buckets internally. Must not be used in insert or lookup operations.  
  deleted_key   A Tensor. Must have the same type as empty_key.  
  value_dtype   A tf.DType. Type of the table values.  
  container   An optional string. Defaults to "". If non-empty, this table is placed in the given container. Otherwise, a default container is used.  
  shared_name   An optional string. Defaults to "". If non-empty, this table is shared under the given name across multiple sessions.  
  use_node_name_sharing   An optional bool. Defaults to False.  
  value_shape   An optional tf.TensorShape or list of ints. Defaults to []. The shape of each value.  
  initial_num_buckets   An optional int. Defaults to 131072. The initial number of hash table buckets. Must be a power to 2.  
  max_load_factor   An optional float. Defaults to 0.8. The maximum ratio between number of entries and number of buckets before growing the table. Must be between 0 and 1.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type resource.
tf.raw_ops.MutableHashTable Creates an empty hash table.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MutableHashTable  
tf.raw_ops.MutableHashTable(
    key_dtype, value_dtype, container='', shared_name='',
    use_node_name_sharing=False, name=None
)
 This op creates a mutable hash table, specifying the type of its keys and values. Each value must be a scalar. Data can be inserted into the table using the insert operations. It does not support the initialization operation.
 


 Args
  key_dtype   A tf.DType. Type of the table keys.  
  value_dtype   A tf.DType. Type of the table values.  
  container   An optional string. Defaults to "". If non-empty, this table is placed in the given container. Otherwise, a default container is used.  
  shared_name   An optional string. Defaults to "". If non-empty, this table is shared under the given name across multiple sessions.  
  use_node_name_sharing   An optional bool. Defaults to False. If true and shared_name is empty, the table is shared using the node name.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type mutable string.
tf.raw_ops.MutableHashTableOfTensors Creates an empty hash table.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MutableHashTableOfTensors  
tf.raw_ops.MutableHashTableOfTensors(
    key_dtype, value_dtype, container='', shared_name='',
    use_node_name_sharing=False, value_shape=[], name=None
)
 This op creates a mutable hash table, specifying the type of its keys and values. Each value must be a vector. Data can be inserted into the table using the insert operations. It does not support the initialization operation.
 


 Args
  key_dtype   A tf.DType. Type of the table keys.  
  value_dtype   A tf.DType. Type of the table values.  
  container   An optional string. Defaults to "". If non-empty, this table is placed in the given container. Otherwise, a default container is used.  
  shared_name   An optional string. Defaults to "". If non-empty, this table is shared under the given name across multiple sessions.  
  use_node_name_sharing   An optional bool. Defaults to False.  
  value_shape   An optional tf.TensorShape or list of ints. Defaults to [].  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type mutable string.
tf.raw_ops.MutableHashTableOfTensorsV2 Creates an empty hash table.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MutableHashTableOfTensorsV2  
tf.raw_ops.MutableHashTableOfTensorsV2(
    key_dtype, value_dtype, container='', shared_name='',
    use_node_name_sharing=False, value_shape=[], name=None
)
 This op creates a mutable hash table, specifying the type of its keys and values. Each value must be a vector. Data can be inserted into the table using the insert operations. It does not support the initialization operation.
 


 Args
  key_dtype   A tf.DType. Type of the table keys.  
  value_dtype   A tf.DType. Type of the table values.  
  container   An optional string. Defaults to "". If non-empty, this table is placed in the given container. Otherwise, a default container is used.  
  shared_name   An optional string. Defaults to "". If non-empty, this table is shared under the given name across multiple sessions.  
  use_node_name_sharing   An optional bool. Defaults to False.  
  value_shape   An optional tf.TensorShape or list of ints. Defaults to [].  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type resource.
tf.raw_ops.MutableHashTableV2 Creates an empty hash table.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MutableHashTableV2  
tf.raw_ops.MutableHashTableV2(
    key_dtype, value_dtype, container='', shared_name='',
    use_node_name_sharing=False, name=None
)
 This op creates a mutable hash table, specifying the type of its keys and values. Each value must be a scalar. Data can be inserted into the table using the insert operations. It does not support the initialization operation.
 


 Args
  key_dtype   A tf.DType. Type of the table keys.  
  value_dtype   A tf.DType. Type of the table values.  
  container   An optional string. Defaults to "". If non-empty, this table is placed in the given container. Otherwise, a default container is used.  
  shared_name   An optional string. Defaults to "". If non-empty, this table is shared under the given name across multiple sessions.  
  use_node_name_sharing   An optional bool. Defaults to False. If true and shared_name is empty, the table is shared using the node name.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type resource.
tf.raw_ops.MutexLock Locks a mutex resource. The output is the lock. So long as the lock tensor  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MutexLock  
tf.raw_ops.MutexLock(
    mutex, name=None
)
 is alive, any other request to use MutexLock with this mutex will wait. This is particularly useful for creating a critical section when used in conjunction with MutexLockIdentity: 
mutex = mutex_v2(
  shared_name=handle_name, container=container, name=name)

def execute_in_critical_section(fn, *args, **kwargs):
  lock = gen_resource_variable_ops.mutex_lock(mutex)

  with ops.control_dependencies([lock]):
    r = fn(*args, **kwargs)

  with ops.control_dependencies(nest.flatten(r)):
    with ops.colocate_with(mutex):
      ensure_lock_exists = mutex_lock_identity(lock)

    # Make sure that if any element of r is accessed, all of
    # them are executed together.
    r = nest.map_structure(tf.identity, r)

  with ops.control_dependencies([ensure_lock_exists]):
    return nest.map_structure(tf.identity, r)
 While fn is running in the critical section, no other functions which wish to use this critical section may run. Often the use case is that two executions of the same graph, in parallel, wish to run fn; and we wish to ensure that only one of them executes at a time. This is especially important if fn modifies one or more variables at a time. It is also useful if two separate functions must share a resource, but we wish to ensure the usage is exclusive.
 


 Args
  mutex   A Tensor of type resource. The mutex resource to lock.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type variant.
tf.raw_ops.MutexV2 Creates a Mutex resource that can be locked by MutexLock.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.MutexV2  
tf.raw_ops.MutexV2(
    container='', shared_name='', name=None
)

 


 Args
  container   An optional string. Defaults to "". If non-empty, this variable is placed in the given container. Otherwise, a default container is used.  
  shared_name   An optional string. Defaults to "". If non-empty, this variable is named in the given bucket with this shared_name. Otherwise, the node name is used instead.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type resource.
tf.raw_ops.NcclAllReduce Outputs a tensor containing the reduction across all input tensors.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.NcclAllReduce  
tf.raw_ops.NcclAllReduce(
    input, reduction, num_devices, shared_name, name=None
)
 Outputs a tensor containing the reduction across all input tensors passed to ops within the same `shared_name. The graph should be constructed so if one op runs with shared_name value c, then num_devices ops will run with shared_name value c. Failure to do so will cause the graph execution to fail to complete. input: the input to the reduction data: the value of the reduction across all num_devices devices. reduction: the reduction operation to perform. num_devices: The number of devices participating in this reduction. shared_name: Identifier that shared between ops of the same reduction.
 


 Args
  input   A Tensor. Must be one of the following types: half, float32, float64, int32, int64.  
  reduction   A string from: "min", "max", "prod", "sum".  
  num_devices   An int.  
  shared_name   A string.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as input.