neulab/docprompting-conala huggingface dataset:
tf.compat.v1.nn.max_pool Performs the max pooling on the input. 
tf.compat.v1.nn.max_pool(
    value, ksize, strides, padding, data_format='NHWC', name=None,
    input=None
)

 


 Args
  value   A 4-D Tensor of the format specified by data_format.  
  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   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]]. When using explicit padding, the size of the paddings cannot be greater than the sliding window size. </td> </tr><tr> <td>data_format</td> <td> A string. 'NHWC', 'NCHW' and 'NCHW_VECT_C' are supported. </td> </tr><tr> <td>name</td> <td> Optional name for the operation. </td> </tr><tr> <td>input`   Alias for value.   
 


 Returns   A Tensor of format specified by data_format. The max pooled output tensor.
tf.compat.v1.nn.max_pool_with_argmax Performs max pooling on the input and outputs both max values and indices. 
tf.compat.v1.nn.max_pool_with_argmax(
    input, ksize, strides, padding, data_format='NHWC', Targmax=None,
    name=None, output_dtype=None, include_batch_in_index=False
)
 The indices in argmax are flattened, so that a maximum value at position [b, y, x, c] becomes flattened index: (y * width + x) * channels + c if include_batch_in_index is False; ((b * height + y) * width + x) * channels + c if include_batch_in_index is True. The indices returned are always in [0, height) x [0, width) before flattening, even if padding is involved and the mathematically correct answer is outside (either negative or too large). This is a bug, but fixing it is difficult to do in a safe backwards compatible way, especially due to flattening.
 


 Args
  input   A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64. 4-D with shape [batch, height, width, channels]. Input to pool over.  
  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 from: "SAME", "VALID". The type of padding algorithm to use.  
  Targmax   An optional tf.DType from: tf.int32, tf.int64. Defaults to tf.int64.  
  include_batch_in_index   An optional bool. Defaults to False. Whether to include batch dimension in flattened index of argmax.  
  name   A name for the operation (optional).   
 


 Returns   A tuple of Tensor objects (output, argmax).     output   A Tensor. Has the same type as input.  
  argmax   A Tensor of type Targmax.
tf.compat.v1.nn.moments Calculate the mean and variance of x. 
tf.compat.v1.nn.moments(
    x, axes, shift=None, name=None, keep_dims=None, keepdims=None
)
 The mean and variance are calculated by aggregating the contents of x across axes. If x is 1-D and axes = [0] this is just the mean and variance of a vector. 
Note: shift is currently not used; the true mean is computed and used.
 When using these moments for batch normalization (see tf.nn.batch_normalization):  for so-called "global normalization", used with convolutional filters with shape [batch, height, width, depth], pass axes=[0, 1, 2]. for simple batch normalization pass axes=[0] (batch only). 
 


 Args
  x   A Tensor.  
  axes   Array of ints. Axes along which to compute mean and variance.  
  shift   Not used in the current implementation  
  name   Name used to scope the operations that compute the moments.  
  keep_dims   produce moments with the same dimensionality as the input.  
  keepdims   Alias to keep_dims.   
 


 Returns   Two Tensor objects: mean and variance.
tf.compat.v1.nn.pool Performs an N-D pooling operation. 
tf.compat.v1.nn.pool(
    input, window_shape, pooling_type, padding, dilation_rate=None, strides=None,
    name=None, data_format=None, dilations=None
)
 In the case that data_format does not start with "NC", computes for 0 <= b < batch_size, 0 <= x[i] < output_spatial_shape[i], 0 <= c < num_channels: output[b, x[0], ..., x[N-1], c] =
  REDUCE_{z[0], ..., z[N-1]}
    input[b,
          x[0] * strides[0] - pad_before[0] + dilation_rate[0]*z[0],
          ...
          x[N-1]*strides[N-1] - pad_before[N-1] + dilation_rate[N-1]*z[N-1],
          c],
 where the reduction function REDUCE depends on the value of pooling_type, and pad_before is defined based on the value of padding as described in the "returns" section of tf.nn.convolution for details. The reduction never includes out-of-bounds positions. In the case that data_format starts with "NC", the input and output are simply transposed as follows: pool(input, data_format, **kwargs) =
  tf.transpose(pool(tf.transpose(input, [0] + range(2,N+2) + [1]),
                    **kwargs),
               [0, N+1] + range(1, N+1))

 


 Args
  input   Tensor of rank N+2, of shape [batch_size] + input_spatial_shape + [num_channels] if data_format does not start with "NC" (default), or [batch_size, num_channels] + input_spatial_shape if data_format starts with "NC". Pooling happens over the spatial dimensions only.  
  window_shape   Sequence of N ints >= 1.  
  pooling_type   Specifies pooling operation, must be "AVG" or "MAX".  
  padding   The padding algorithm, must be "SAME" or "VALID". See the "returns" section of tf.nn.convolution for details.  
  dilation_rate   Optional. Dilation rate. List of N ints >= 1. Defaults to [1]N. If any value of dilation_rate is > 1, then all values of strides must be 1. 
 
  strides   Optional. Sequence of N ints >= 1. Defaults to [1]N. If any value of strides is > 1, then all values of dilation_rate must be 1.  
  name   Optional. Name of the op.  
  data_format   A string or None. Specifies whether the channel dimension of the input and output is the last dimension (default, or if data_format does not start with "NC"), or the second dimension (if data_format starts with "NC"). For N=1, the valid values are "NWC" (default) and "NCW". For N=2, the valid values are "NHWC" (default) and "NCHW". For N=3, the valid values are "NDHWC" (default) and "NCDHW".  
  dilations   Alias for dilation_rate   
 


 Returns   Tensor of rank N+2, of shape [batch_size] + output_spatial_shape + [num_channels] if data_format is None or does not start with "NC", or [batch_size, num_channels] + output_spatial_shape if data_format starts with "NC", where output_spatial_shape depends on the value of padding: If padding = "SAME": output_spatial_shape[i] = ceil(input_spatial_shape[i] / strides[i]) If padding = "VALID": output_spatial_shape[i] = ceil((input_spatial_shape[i] - (window_shape[i] - 1) * dilation_rate[i]) / strides[i]). 
 

 


 Raises
  ValueError   if arguments are invalid.
tf.compat.v1.nn.quantized_avg_pool Produces the average pool of the input tensor for quantized types. 
tf.compat.v1.nn.quantized_avg_pool(
    input, min_input, max_input, ksize, strides, padding, name=None
)

 


 Args
  input   A Tensor. Must be one of the following types: qint8, quint8, qint32, qint16, quint16. 4-D with shape [batch, height, width, channels].  
  min_input   A Tensor of type float32. The float value that the lowest quantized input value represents.  
  max_input   A Tensor of type float32. The float value that the highest quantized input value represents.  
  ksize   A list of ints. The size of the window for each dimension of the input tensor. The length must be 4 to match the number of dimensions of the input.  
  strides   A list of ints. The stride of the sliding window for each dimension of the input tensor. The length must be 4 to match the number of dimensions of the input.  
  padding   A string from: "SAME", "VALID". The type of padding algorithm to use.  
  name   A name for the operation (optional).   
 


 Returns   A tuple of Tensor objects (output, min_output, max_output).     output   A Tensor. Has the same type as input.  
  min_output   A Tensor of type float32.  
  max_output   A Tensor of type float32.
tf.compat.v1.nn.quantized_conv2d Computes a 2D convolution given quantized 4D input and filter tensors. 
tf.compat.v1.nn.quantized_conv2d(
    input, filter, min_input, max_input, min_filter, max_filter, strides, padding,
    out_type=tf.dtypes.qint32, dilations=[1, 1, 1, 1], name=None
)
 The inputs are quantized tensors where the lowest value represents the real number of the associated minimum, and the highest represents the maximum. This means that you can only interpret the quantized output in the same way, by taking the returned minimum and maximum values into account.
 


 Args
  input   A Tensor. Must be one of the following types: qint8, quint8, qint32, qint16, quint16.  
  filter   A Tensor. Must be one of the following types: qint8, quint8, qint32, qint16, quint16. filter's input_depth dimension must match input's depth dimensions.  
  min_input   A Tensor of type float32. The float value that the lowest quantized input value represents.  
  max_input   A Tensor of type float32. The float value that the highest quantized input value represents.  
  min_filter   A Tensor of type float32. The float value that the lowest quantized filter value represents.  
  max_filter   A Tensor of type float32. The float value that the highest quantized filter value represents.  
  strides   A list of ints. The stride of the sliding window for each dimension of the input tensor.  
  padding   A string from: "SAME", "VALID". The type of padding algorithm to use.  
  out_type   An optional tf.DType from: tf.qint8, tf.quint8, tf.qint32, tf.qint16, tf.quint16. Defaults to tf.qint32.  
  dilations   An optional list of ints. Defaults to [1, 1, 1, 1]. 1-D tensor of length 4. 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 tuple of Tensor objects (output, min_output, max_output).     output   A Tensor of type out_type.  
  min_output   A Tensor of type float32.  
  max_output   A Tensor of type float32.
tf.compat.v1.nn.quantized_max_pool Produces the max pool of the input tensor for quantized types. 
tf.compat.v1.nn.quantized_max_pool(
    input, min_input, max_input, ksize, strides, padding, name=None
)

 


 Args
  input   A Tensor. Must be one of the following types: qint8, quint8, qint32, qint16, quint16. The 4D (batch x rows x cols x depth) Tensor to MaxReduce over.  
  min_input   A Tensor of type float32. The float value that the lowest quantized input value represents.  
  max_input   A Tensor of type float32. The float value that the highest quantized input value represents.  
  ksize   A list of ints. The size of the window for each dimension of the input tensor. The length must be 4 to match the number of dimensions of the input.  
  strides   A list of ints. The stride of the sliding window for each dimension of the input tensor. The length must be 4 to match the number of dimensions of the input.  
  padding   A string from: "SAME", "VALID". The type of padding algorithm to use.  
  name   A name for the operation (optional).   
 


 Returns   A tuple of Tensor objects (output, min_output, max_output).     output   A Tensor. Has the same type as input.  
  min_output   A Tensor of type float32.  
  max_output   A Tensor of type float32.
tf.compat.v1.nn.quantized_relu_x Computes Quantized Rectified Linear X: min(max(features, 0), max_value) 
tf.compat.v1.nn.quantized_relu_x(
    features, max_value, min_features, max_features, out_type=tf.dtypes.quint8,
    name=None
)

 


 Args
  features   A Tensor. Must be one of the following types: qint8, quint8, qint32, qint16, quint16.  
  max_value   A Tensor of type float32.  
  min_features   A Tensor of type float32. The float value that the lowest quantized value represents.  
  max_features   A Tensor of type float32. The float value that the highest quantized value represents.  
  out_type   An optional tf.DType from: tf.qint8, tf.quint8, tf.qint32, tf.qint16, tf.quint16. Defaults to tf.quint8.  
  name   A name for the operation (optional).   
 


 Returns   A tuple of Tensor objects (activations, min_activations, max_activations).     activations   A Tensor of type out_type.  
  min_activations   A Tensor of type float32.  
  max_activations   A Tensor of type float32.
tf.compat.v1.nn.relu_layer Computes Relu(x * weight + biases). 
tf.compat.v1.nn.relu_layer(
    x, weights, biases, name=None
)

 


 Args
  x   a 2D tensor. Dimensions typically: batch, in_units  
  weights   a 2D tensor. Dimensions typically: in_units, out_units  
  biases   a 1D tensor. Dimensions: out_units  
  name   A name for the operation (optional). If not specified "nn_relu_layer" is used.   
 


 Returns   A 2-D Tensor computing relu(matmul(x, weights) + biases). Dimensions typically: batch, out_units.
Module: tf.compat.v1.nn.rnn_cell Module for constructing RNN Cells. Classes class BasicLSTMCell: DEPRECATED: Please use tf.compat.v1.nn.rnn_cell.LSTMCell instead. class BasicRNNCell: The most basic RNN cell. class DeviceWrapper: Operator that ensures an RNNCell runs on a particular device. class DropoutWrapper: Operator adding dropout to inputs and outputs of the given cell. class GRUCell: Gated Recurrent Unit cell. class LSTMCell: Long short-term memory unit (LSTM) recurrent network cell. class LSTMStateTuple: Tuple used by LSTM Cells for state_size, zero_state, and output state. class MultiRNNCell: RNN cell composed sequentially of multiple simple cells. class RNNCell: Abstract object representing an RNN cell. class ResidualWrapper: RNNCell wrapper that ensures cell inputs are added to the outputs.
tf.compat.v1.nn.rnn_cell.BasicLSTMCell DEPRECATED: Please use tf.compat.v1.nn.rnn_cell.LSTMCell instead. Inherits From: RNNCell, Layer, Layer, Module 
tf.compat.v1.nn.rnn_cell.BasicLSTMCell(
    num_units, forget_bias=1.0, state_is_tuple=True, activation=None, reuse=None,
    name=None, dtype=None, **kwargs
)
 Basic LSTM recurrent network cell. The implementation is based on We add forget_bias (default: 1) to the biases of the forget gate in order to reduce the scale of forgetting in the beginning of the training. It does not allow cell clipping, a projection layer, and does not use peep-hole connections: it is the basic baseline. For advanced models, please use the full tf.compat.v1.nn.rnn_cell.LSTMCell that follows. Note that this cell is not optimized for performance. Please use tf.contrib.cudnn_rnn.CudnnLSTM for better performance on GPU, or tf.contrib.rnn.LSTMBlockCell and tf.contrib.rnn.LSTMBlockFusedCell for better performance on CPU.
 


 Args
  num_units   int, The number of units in the LSTM cell.  
  forget_bias   float, The bias added to forget gates (see above). Must set to 0.0 manually when restoring from CudnnLSTM-trained checkpoints.  
  state_is_tuple   If True, accepted and returned states are 2-tuples of the c_state and m_state. If False, they are concatenated along the column axis. The latter behavior will soon be deprecated.  
  activation   Activation function of the inner states. Default: tanh. It could also be string that is within Keras activation function names.  
  reuse   (optional) Python boolean describing whether to reuse variables in an existing scope. If not True, and the existing scope already has the given variables, an error is raised.  
  name   String, the name of the layer. Layers with the same name will share weights, but to avoid mistakes we require reuse=True in such cases.  
  dtype   Default dtype of the layer (default of None means use the type of the first input). Required when build is called before call.  
  **kwargs   Dict, keyword named properties for common layer attributes, like trainable etc when constructing the cell from configs of get_config(). When restoring from CudnnLSTM-trained checkpoints, must use CudnnCompatibleLSTMCell instead.   
 


 Attributes
  graph  
 
  output_size   Integer or TensorShape: size of outputs produced by this cell.  
  scope_name  
 
  state_size   size(s) of state(s) used by this cell. It can be represented by an Integer, a TensorShape or a tuple of Integers or TensorShapes. 
   Methods get_initial_state View source 
get_initial_state(
    inputs=None, batch_size=None, dtype=None
)
 zero_state View source 
zero_state(
    batch_size, dtype
)
 Return zero-filled state tensor(s).
 


 Args
  batch_size   int, float, or unit Tensor representing the batch size.  
  dtype   the data type to use for the state.   
 


 Returns   If state_size is an int or TensorShape, then the return value is a N-D tensor of shape [batch_size, state_size] filled with zeros. If state_size is a nested list or tuple, then the return value is a nested list or tuple (of the same structure) of 2-D tensors with the shapes [batch_size, s] for each s in state_size.
tf.compat.v1.nn.rnn_cell.BasicRNNCell The most basic RNN cell. Inherits From: RNNCell, Layer, Layer, Module 
tf.compat.v1.nn.rnn_cell.BasicRNNCell(
    num_units, activation=None, reuse=None, name=None, dtype=None, **kwargs
)
 Note that this cell is not optimized for performance. Please use tf.contrib.cudnn_rnn.CudnnRNNTanh for better performance on GPU.
 


 Args
  num_units   int, The number of units in the RNN cell.  
  activation   Nonlinearity to use. Default: tanh. It could also be string that is within Keras activation function names.  
  reuse   (optional) Python boolean describing whether to reuse variables in an existing scope. If not True, and the existing scope already has the given variables, an error is raised.  
  name   String, the name of the layer. Layers with the same name will share weights, but to avoid mistakes we require reuse=True in such cases.  
  dtype   Default dtype of the layer (default of None means use the type of the first input). Required when build is called before call.  
  **kwargs   Dict, keyword named properties for common layer attributes, like trainable etc when constructing the cell from configs of get_config().   
 


 Attributes
  graph  
 
  output_size   Integer or TensorShape: size of outputs produced by this cell.  
  scope_name  
 
  state_size   size(s) of state(s) used by this cell. It can be represented by an Integer, a TensorShape or a tuple of Integers or TensorShapes. 
   Methods get_initial_state View source 
get_initial_state(
    inputs=None, batch_size=None, dtype=None
)
 zero_state View source 
zero_state(
    batch_size, dtype
)
 Return zero-filled state tensor(s).
 


 Args
  batch_size   int, float, or unit Tensor representing the batch size.  
  dtype   the data type to use for the state.   
 


 Returns   If state_size is an int or TensorShape, then the return value is a N-D tensor of shape [batch_size, state_size] filled with zeros. If state_size is a nested list or tuple, then the return value is a nested list or tuple (of the same structure) of 2-D tensors with the shapes [batch_size, s] for each s in state_size.
tf.compat.v1.nn.rnn_cell.DeviceWrapper Operator that ensures an RNNCell runs on a particular device. Inherits From: RNNCell, Layer, Layer, Module 
tf.compat.v1.nn.rnn_cell.DeviceWrapper(
    *args, **kwargs
)

 


 Args
  cell   An instance of RNNCell.  
  device   A device string or function, for passing to tf.device.  
  **kwargs   dict of keyword arguments for base layer.   
 


 Attributes
  graph  
 
  output_size  
 
  scope_name  
 
  state_size  
   Methods get_initial_state View source 
get_initial_state(
    inputs=None, batch_size=None, dtype=None
)
 zero_state View source 
zero_state(
    batch_size, dtype
)
tf.compat.v1.nn.rnn_cell.DropoutWrapper Operator adding dropout to inputs and outputs of the given cell. Inherits From: RNNCell, Layer, Layer, Module 
tf.compat.v1.nn.rnn_cell.DropoutWrapper(
    *args, **kwargs
)

 


 Args
  cell   an RNNCell, a projection to output_size is added to it.  
  input_keep_prob   unit Tensor or float between 0 and 1, input keep probability; if it is constant and 1, no input dropout will be added.  
  output_keep_prob   unit Tensor or float between 0 and 1, output keep probability; if it is constant and 1, no output dropout will be added.  
  state_keep_prob   unit Tensor or float between 0 and 1, output keep probability; if it is constant and 1, no output dropout will be added. State dropout is performed on the outgoing states of the cell. Note the state components to which dropout is applied when state_keep_prob is in (0, 1) are also determined by the argument dropout_state_filter_visitor (e.g. by default dropout is never applied to the c component of an LSTMStateTuple).  
  variational_recurrent   Python bool. If True, then the same dropout pattern is applied across all time steps per run call. If this parameter is set, input_size must be provided.  
  input_size   (optional) (possibly nested tuple of) TensorShape objects containing the depth(s) of the input tensors expected to be passed in to the DropoutWrapper. Required and used iff variational_recurrent = True and input_keep_prob < 1.  
  dtype   (optional) The dtype of the input, state, and output tensors. Required and used iff variational_recurrent = True.  
  seed   (optional) integer, the randomness seed.  
  dropout_state_filter_visitor   (optional), default: (see below). Function that takes any hierarchical level of the state and returns a scalar or depth=1 structure of Python booleans describing which terms in the state should be dropped out. In addition, if the function returns True, dropout is applied across this sublevel. If the function returns False, dropout is not applied across this entire sublevel. Default behavior: perform dropout on all terms except the memory (c) state of LSTMCellState objects, and don't try to apply dropout to TensorArray objects: def dropout_state_filter_visitor(s): if isinstance(s, LSTMCellState): # Never perform dropout on the c state. return LSTMCellState(c=False, h=True) elif isinstance(s, TensorArray): return False return True  
  **kwargs   dict of keyword arguments for base layer.   
 


 Raises
  TypeError   if cell is not an RNNCell, or keep_state_fn is provided but not callable.  
  ValueError   if any of the keep_probs are not between 0 and 1.   
 


 Attributes
  graph  
 
  output_size  
 
  scope_name  
 
  state_size  
 
  wrapped_cell  
   Methods get_initial_state View source 
get_initial_state(
    inputs=None, batch_size=None, dtype=None
)
 zero_state View source 
zero_state(
    batch_size, dtype
)