neulab/docprompting-conala huggingface dataset:
Module: tf.compat.v1.mixed_precision Public API for tf.mixed_precision namespace. Modules experimental module: Public API for tf.mixed_precision.experimental namespace. Classes class DynamicLossScale: Loss scale that dynamically adjusts itself. class FixedLossScale: Loss scale with a fixed value. class LossScale: Base class for all TF1 loss scales. class MixedPrecisionLossScaleOptimizer: An optimizer that applies loss scaling. Functions disable_mixed_precision_graph_rewrite(...): Disables the mixed precision graph rewrite. enable_mixed_precision_graph_rewrite(...): Enable mixed precision via a graph rewrite.
tf.compat.v1.mixed_precision.disable_mixed_precision_graph_rewrite Disables the mixed precision graph rewrite.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.train.experimental.disable_mixed_precision_graph_rewrite  
tf.compat.v1.mixed_precision.disable_mixed_precision_graph_rewrite()
 After this is called, the mixed precision graph rewrite will no longer run for new Sessions, and so float32 operations will no longer be converted to float16 in such Sessions. However, any existing Sessions will continue to have the graph rewrite enabled if they were created after enable_mixed_precision_graph_rewrite was called but before disable_mixed_precision_graph_rewrite was called. This does not undo the effects of loss scaling. Any optimizers wrapped with a LossScaleOptimizer will continue to do loss scaling, although this loss scaling will no longer be useful if the optimizer is used in new Sessions, as the graph rewrite no longer converts the graph to use float16. This function is useful for unit testing. A unit tests can test using the mixed precision graph rewrite, then disable it so future unit tests continue using float32. If this is done, unit tests should not share a single session, as enable_mixed_precision_graph_rewrite and disable_mixed_precision_graph_rewrite have no effect on existing sessions.
Module: tf.compat.v1.mixed_precision.experimental Public API for tf.mixed_precision.experimental namespace. Classes class DynamicLossScale: Loss scale that dynamically adjusts itself. class FixedLossScale: Loss scale with a fixed value. class LossScale: Base class for all TF1 loss scales.
Module: tf.compat.v1.mlir Public API for tf.mlir namespace. Modules experimental module: Public API for tf.mlir.experimental namespace.
Module: tf.compat.v1.mlir.experimental Public API for tf.mlir.experimental namespace. Functions convert_function(...): Import a ConcreteFunction and convert it to a textual MLIR module. convert_graph_def(...): Import a GraphDef and convert it to a textual MLIR module.
tf.compat.v1.model_variables Returns all variables in the MODEL_VARIABLES collection. 
tf.compat.v1.model_variables(
    scope=None
)

 


 Args
  scope   (Optional.) A string. If supplied, the resulting list is filtered to include only items whose name attribute matches scope using re.match. Items without a name attribute are never returned if a scope is supplied. The choice of re.match means that a scope without special tokens filters by prefix.   
 


 Returns   A list of local Variable objects.
tf.compat.v1.moving_average_variables Returns all variables that maintain their moving averages. 
tf.compat.v1.moving_average_variables(
    scope=None
)
 If an ExponentialMovingAverage object is created and the apply() method is called on a list of variables, these variables will be added to the GraphKeys.MOVING_AVERAGE_VARIABLES collection. This convenience function returns the contents of that collection.
 


 Args
  scope   (Optional.) A string. If supplied, the resulting list is filtered to include only items whose name attribute matches scope using re.match. Items without a name attribute are never returned if a scope is supplied. The choice of re.match means that a scope without special tokens filters by prefix.   
 


 Returns   A list of Variable objects.
tf.compat.v1.multinomial Draws samples from a multinomial distribution. (deprecated)  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.random.multinomial  
tf.compat.v1.multinomial(
    logits, num_samples, seed=None, name=None, output_dtype=None
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.random.categorical instead. Example: # samples has shape [1, 5], where each value is either 0 or 1 with equal
# probability.
samples = tf.random.categorical(tf.math.log([[0.5, 0.5]]), 5)

 


 Args
  logits   2-D Tensor with shape [batch_size, num_classes]. Each slice [i, :] represents the unnormalized log-probabilities for all classes.  
  num_samples   0-D. Number of independent samples to draw for each row slice.  
  seed   A Python integer. Used to create a random seed for the distribution. See tf.random.set_seed for behavior.  
  name   Optional name for the operation.  
  output_dtype   integer type to use for the output. Defaults to int64.   
 


 Returns   The drawn samples of shape [batch_size, num_samples].
tf.compat.v1.NameAttrList A ProtocolMessage
 


 Attributes
  attr   repeated AttrEntry attr  
  name   string name    Child Classes class AttrEntry
tf.compat.v1.NameAttrList.AttrEntry A ProtocolMessage
 


 Attributes
  key   string key  
  value   AttrValue value
Module: tf.compat.v1.nest Public API for tf.nest namespace. Functions assert_same_structure(...): Asserts that two structures are nested in the same way. flatten(...): Returns a flat list from a given nested structure. is_nested(...): Returns true if its input is a collections.abc.Sequence (except strings). map_structure(...): Applies func to each entry in structure and returns a new structure. pack_sequence_as(...): Returns a given flattened sequence packed into a given structure.
tf.compat.v1.nn.avg_pool Performs the average pooling on the input.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.nn.avg_pool2d  
tf.compat.v1.nn.avg_pool(
    value, ksize, strides, padding, data_format='NHWC', name=None,
    input=None
)
 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   An int or list of ints that has length 1, 2 or 4. The size of the window for each dimension of the input tensor.  
  strides   An int or list of ints that has length 1, 2 or 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 "returns" section of tf.nn.convolution for details.  
  data_format   A string. 'NHWC' and 'NCHW' are supported.  
  name   Optional name for the operation.  
  input   Alias for value.   
 


 Returns   A Tensor with the same type as value. The average pooled output tensor.
tf.compat.v1.nn.batch_norm_with_global_normalization Batch normalization. 
tf.compat.v1.nn.batch_norm_with_global_normalization(
    t=None, m=None, v=None, beta=None, gamma=None, variance_epsilon=None,
    scale_after_normalization=None, name=None, input=None, mean=None, variance=None
)
 This op is deprecated. See tf.nn.batch_normalization.
 


 Args
  t   A 4D input Tensor.  
  m   A 1D mean Tensor with size matching the last dimension of t. This is the first output from tf.nn.moments, or a saved moving average thereof.  
  v   A 1D variance Tensor with size matching the last dimension of t. This is the second output from tf.nn.moments, or a saved moving average thereof.  
  beta   A 1D beta Tensor with size matching the last dimension of t. An offset to be added to the normalized tensor.  
  gamma   A 1D gamma Tensor with size matching the last dimension of t. If "scale_after_normalization" is true, this tensor will be multiplied with the normalized tensor.  
  variance_epsilon   A small float number to avoid dividing by 0.  
  scale_after_normalization   A bool indicating whether the resulted tensor needs to be multiplied with gamma.  
  name   A name for this operation (optional).  
  input   Alias for t.  
  mean   Alias for m.  
  variance   Alias for v.   
 


 Returns   A batch-normalized t.  
 References: Batch Normalization - Accelerating Deep Network Training by Reducing Internal Covariate Shift: Ioffe et al., 2015 (pdf)
tf.compat.v1.nn.conv1d   Computes a 1-D convolution of input with rank >=3 and a 3-D filter. (deprecated argument values) (deprecated argument values) 
tf.compat.v1.nn.conv1d(
    value=None, filters=None, stride=None, padding=None, use_cudnn_on_gpu=None,
    data_format=None, name=None, input=None, dilations=None
)
 Warning: SOME ARGUMENT VALUES ARE DEPRECATED: (data_format='NCHW'). They will be removed in a future version. Instructions for updating: NCHW for data_format is deprecated, use NCW insteadWarning: SOME ARGUMENT VALUES ARE DEPRECATED: (data_format='NHWC'). They will be removed in a future version. Instructions for updating: NHWC for data_format is deprecated, use NWC instead Given an input tensor of shape batch_shape + [in_width, in_channels] if data_format is "NWC", or batch_shape + [in_channels, in_width] if data_format is "NCW", and a filter / kernel tensor of shape [filter_width, in_channels, out_channels], this op reshapes the arguments to pass them to conv2d to perform the equivalent convolution operation. Internally, this op reshapes the input tensors and invokes tf.nn.conv2d. For example, if data_format does not start with "NC", a tensor of shape batch_shape + [in_width, in_channels] is reshaped to batch_shape + [1, in_width, in_channels], and the filter is reshaped to [1, filter_width, in_channels, out_channels]. The result is then reshaped back to batch_shape + [out_width, out_channels] (where out_width is a function of the stride and padding as in conv2d) and returned to the caller.
 


 Args
  value   A Tensor of rank at least 3. Must be of type float16, float32, or float64.  
  filters   A Tensor of rank at least 3. Must have the same type as value.  
  stride   An int or list of ints that has length 1 or 3. The number of entries by which the filter is moved right at each step.  
  padding   'SAME' or 'VALID'  
  use_cudnn_on_gpu   An optional bool. Defaults to True.  
  data_format   An optional string from "NWC", "NCW". Defaults to "NWC", the data is stored in the order of batch_shape + [in_width, in_channels]. The "NCW" format stores data as batch_shape + [in_channels, in_width].  
  name   A name for the operation (optional).  
  input   Alias for value.  
  dilations   An int or list of ints that has length 1 or 3 which defaults to 1. The dilation factor for each dimension of input. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. Dilations in the batch and depth dimensions must be 1.   
 


 Returns   A Tensor. Has the same type as input.  

 


 Raises
  ValueError   if data_format is invalid.
tf.compat.v1.nn.conv2d_backprop_filter Computes the gradients of convolution with respect to the filter. 
tf.compat.v1.nn.conv2d_backprop_filter(
    input, filter_sizes, out_backprop, strides, padding, use_cudnn_on_gpu=True,
    data_format='NHWC', dilations=[1, 1, 1, 1], name=None
)

 


 Args
  input   A Tensor. Must be one of the following types: half, bfloat16, float32, float64. 4-D with shape [batch, in_height, in_width, in_channels].  
  filter_sizes   A Tensor of type int32. An integer vector representing the tensor shape of filter, where filter is a 4-D [filter_height, filter_width, in_channels, out_channels] tensor.  
  out_backprop   A Tensor. Must have the same type as input. 4-D with shape [batch, out_height, out_width, out_channels]. Gradients w.r.t. the output of the convolution.  
  strides   A list of ints. The stride of the sliding window for each dimension of the input of the convolution. Must be in the same order as the dimension specified with format.  
  padding   Either the string"SAME"or"VALID"indicating the type of padding algorithm to use, or a list indicating the explicit paddings at the start and end of each dimension. When explicit padding is used and data_format is"NHWC", this should be in the form[[0, 0], [pad_top, pad_bottom], [pad_left, pad_right], [0, 0]]. When explicit padding used and data_format is"NCHW", this should be in the form[[0, 0], [0, 0], [pad_top, pad_bottom], [pad_left, pad_right]]. </td> </tr><tr> <td>use_cudnn_on_gpu</td> <td> An optionalbool. Defaults toTrue. </td> </tr><tr> <td>data_format</td> <td> An optionalstringfrom:"NHWC", "NCHW". Defaults to"NHWC". Specify the data format of the input and output data. With the default format "NHWC", the data is stored in the order of: [batch, in_height, in_width, in_channels]. Alternatively, the format could be "NCHW", the data storage order of: [batch, in_channels, in_height, in_width]. </td> </tr><tr> <td>dilations</td> <td> An optional list ofints. Defaults to[1, 1, 1, 1]. 1-D tensor of length 4. The dilation factor for each dimension ofinput. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value ofdata_format, see above for details. Dilations in the batch and depth dimensions must be 1. </td> </tr><tr> <td>name`   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as input.
tf.compat.v1.nn.conv2d_backprop_input Computes the gradients of convolution with respect to the input. 
tf.compat.v1.nn.conv2d_backprop_input(
    input_sizes, filter=None, out_backprop=None, strides=None, padding=None,
    use_cudnn_on_gpu=True, data_format='NHWC', dilations=[1, 1, 1, 1],
    name=None, filters=None
)

 


 Args
  input_sizes   A Tensor of type int32. An integer vector representing the shape of input, where input is a 4-D [batch, height, width, channels] tensor.  
  filter   A Tensor. Must be one of the following types: half, bfloat16, float32, float64. 4-D with shape [filter_height, filter_width, in_channels, out_channels].  
  out_backprop   A Tensor. Must have the same type as filter. 4-D with shape [batch, out_height, out_width, out_channels]. Gradients w.r.t. the output of the convolution.  
  strides   A list of ints. The stride of the sliding window for each dimension of the input of the convolution. Must be in the same order as the dimension specified with format.  
  padding   Either the string"SAME"or"VALID"indicating the type of padding algorithm to use, or a list indicating the explicit paddings at the start and end of each dimension. When explicit padding is used and data_format is"NHWC", this should be in the form[[0, 0], [pad_top, pad_bottom], [pad_left, pad_right], [0, 0]]. When explicit padding used and data_format is"NCHW", this should be in the form[[0, 0], [0, 0], [pad_top, pad_bottom], [pad_left, pad_right]]. </td> </tr><tr> <td>use_cudnn_on_gpu</td> <td> An optionalbool. Defaults toTrue. </td> </tr><tr> <td>data_format</td> <td> An optionalstringfrom:"NHWC", "NCHW". Defaults to"NHWC". Specify the data format of the input and output data. With the default format "NHWC", the data is stored in the order of: [batch, in_height, in_width, in_channels]. Alternatively, the format could be "NCHW", the data storage order of: [batch, in_channels, in_height, in_width]. </td> </tr><tr> <td>dilations</td> <td> An optional list ofints. Defaults to[1, 1, 1, 1]. 1-D tensor of length 4. The dilation factor for each dimension ofinput. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value ofdata_format, see above for details. Dilations in the batch and depth dimensions must be 1. </td> </tr><tr> <td>name</td> <td> A name for the operation (optional). </td> </tr><tr> <td>filters`   Alias for filter.   
 


 Returns   A Tensor. Has the same type as filter.
tf.compat.v1.nn.conv2d_transpose The transpose of conv2d. 
tf.compat.v1.nn.conv2d_transpose(
    value=None, filter=None, output_shape=None, strides=None,
    padding='SAME', data_format='NHWC', name=None, input=None,
    filters=None, dilations=None
)
 This operation is sometimes called "deconvolution" after (Zeiler et al., 2010), but is really the transpose (gradient) of conv2d rather than an actual deconvolution.
 


 Args
  value   A 4-D Tensor of type float and shape [batch, height, width, in_channels] for NHWC data format or [batch, in_channels, height, width] for NCHW data format.  
  filter   A 4-D Tensor with the same type as value and shape [height, width, output_channels, in_channels]. filter's in_channels dimension must match that of value.  
  output_shape   A 1-D Tensor representing the output shape of the deconvolution op.  
  strides   An int or list of ints that has length 1, 2 or 4. The stride of the sliding window for each dimension of input. If a single value is given it is replicated in the H and W dimension. By default the N and C dimensions are set to 0. The dimension order is determined by the value of data_format, see below for details.  
  padding   A string, either 'VALID' or 'SAME'. The padding algorithm. See the "returns" section of tf.nn.convolution for details.  
  data_format   A string. 'NHWC' and 'NCHW' are supported.  
  name   Optional name for the returned tensor.  
  input   Alias for value.  
  filters   Alias for filter.  
  dilations   An int or list of ints that has length 1, 2 or 4, defaults to 1. The dilation factor for each dimension ofinput. If a single value is given it is replicated in the H and W dimension. By default the N and C dimensions are set to 1. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of data_format, see above for details. Dilations in the batch and depth dimensions if a 4-d tensor must be 1.   
 


 Returns   A Tensor with the same type as value.  

 


 Raises
  ValueError   If input/output depth does not match filter's shape, or if padding is other than 'VALID' or 'SAME'.    References: Deconvolutional Networks: Zeiler et al., 2010 (pdf)
tf.compat.v1.nn.conv3d Computes a 3-D convolution given 5-D input and filter tensors. 
tf.compat.v1.nn.conv3d(
    input, filter=None, strides=None, padding=None, data_format='NDHWC',
    dilations=[1, 1, 1, 1, 1], name=None, filters=None
)
 In signal processing, cross-correlation is a measure of similarity of two waveforms as a function of a time-lag applied to one of them. This is also known as a sliding dot product or sliding inner-product. Our Conv3D implements a form of cross-correlation.
 


 Args
  input   A Tensor. Must be one of the following types: half, bfloat16, float32, float64. Shape [batch, in_depth, in_height, in_width, in_channels].  
  filter   A Tensor. Must have the same type as input. Shape [filter_depth, filter_height, filter_width, in_channels, out_channels]. in_channels must match between input and filter.  
  strides   A list of ints that has length >= 5. 1-D tensor of length 5. The stride of the sliding window for each dimension of input. Must have strides[0] = strides[4] = 1.  
  padding   A string from: "SAME", "VALID". The type of padding algorithm to use.  
  data_format   An optional string from: "NDHWC", "NCDHW". Defaults to "NDHWC". The data format of the input and output data. With the default format "NDHWC", the data is stored in the order of: [batch, in_depth, in_height, in_width, in_channels]. Alternatively, the format could be "NCDHW", the data storage order is: [batch, in_channels, in_depth, in_height, in_width].  
  dilations   An optional list of ints. Defaults to [1, 1, 1, 1, 1]. 1-D tensor of length 5. The dilation factor for each dimension of input. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of data_format, see above for details. Dilations in the batch and depth dimensions must be 1.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as input.
tf.compat.v1.nn.conv3d_backprop_filter Computes the gradients of 3-D convolution with respect to the filter.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.nn.conv3d_backprop_filter_v2  
tf.compat.v1.nn.conv3d_backprop_filter(
    input, filter_sizes, out_backprop, strides, padding,
    data_format='NDHWC', dilations=[1, 1, 1, 1, 1], name=None
)

 


 Args
  input   A Tensor. Must be one of the following types: half, bfloat16, float32, float64. Shape [batch, depth, rows, cols, in_channels].  
  filter_sizes   A Tensor of type int32. An integer vector representing the tensor shape of filter, where filter is a 5-D [filter_depth, filter_height, filter_width, in_channels, out_channels] tensor.  
  out_backprop   A Tensor. Must have the same type as input. Backprop signal of shape [batch, out_depth, out_rows, out_cols, out_channels].  
  strides   A list of ints that has length >= 5. 1-D tensor of length 5. The stride of the sliding window for each dimension of input. Must have strides[0] = strides[4] = 1.  
  padding   A string from: "SAME", "VALID". The type of padding algorithm to use.  
  data_format   An optional string from: "NDHWC", "NCDHW". Defaults to "NDHWC". The data format of the input and output data. With the default format "NDHWC", the data is stored in the order of: [batch, in_depth, in_height, in_width, in_channels]. Alternatively, the format could be "NCDHW", the data storage order is: [batch, in_channels, in_depth, in_height, in_width].  
  dilations   An optional list of ints. Defaults to [1, 1, 1, 1, 1]. 1-D tensor of length 5. The dilation factor for each dimension of input. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of data_format, see above for details. Dilations in the batch and depth dimensions must be 1.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as input.
tf.compat.v1.nn.conv3d_transpose The transpose of conv3d. 
tf.compat.v1.nn.conv3d_transpose(
    value, filter=None, output_shape=None, strides=None, padding='SAME',
    data_format='NDHWC', name=None, input=None, filters=None,
    dilations=None
)
 This operation is sometimes called "deconvolution" after (Zeiler et al., 2010), but is really the transpose (gradient) of conv3d rather than an actual deconvolution.
 


 Args
  value   A 5-D Tensor of type float and shape [batch, depth, height, width, in_channels].  
  filter   A 5-D Tensor with the same type as value and shape [depth, height, width, output_channels, in_channels]. filter's in_channels dimension must match that of value.  
  output_shape   A 1-D Tensor representing the output shape of the deconvolution op.  
  strides   A list of ints. 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 "returns" section of tf.nn.convolution for details.  
  data_format   A string, either 'NDHWC' or 'NCDHW' specifying the layout of the input and output tensors. Defaults to 'NDHWC'.  
  name   Optional name for the returned tensor.  
  input   Alias of value.  
  filters   Alias of filter.  
  dilations   An int or list of ints that has length 1, 3 or 5, defaults to 1. The dilation factor for each dimension ofinput. If a single value is given it is replicated in the D, H and W dimension. By default the N and C dimensions are set to 1. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of data_format, see above for details. Dilations in the batch and depth dimensions if a 5-d tensor must be 1.   
 


 Returns   A Tensor with the same type as value.  

 


 Raises
  ValueError   If input/output depth does not match filter's shape, or if padding is other than 'VALID' or 'SAME'.    References: Deconvolutional Networks: Zeiler et al., 2010 (pdf)