neulab/docprompting-conala huggingface dataset:
tf.compat.v1.placeholder_with_default A placeholder op that passes through input when its output is not fed. 
tf.compat.v1.placeholder_with_default(
    input, shape, name=None
)

 


 Args
  input   A Tensor. The default value to produce when output is not fed.  
  shape   A tf.TensorShape or list of ints. The (possibly partial) shape of the tensor.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as input.
tf.compat.v1.Print Prints a list of tensors. (deprecated) 
tf.compat.v1.Print(
    input_, data, message=None, first_n=None, summarize=None, name=None
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed after 2018-08-20. Instructions for updating: Use tf.print instead of tf.Print. Note that tf.print returns a no-output operator that directly prints the output. Outside of defuns or eager mode, this operator will not be executed unless it is directly specified in session.run or used as a control dependency for other operators. This is only a concern in graph mode. Below is an example of how to ensure tf.print executes in graph mode: This is an identity op (behaves like tf.identity) with the side effect of printing data when evaluating. 
Note: This op prints to the standard error. It is not currently compatible with jupyter notebook (printing to the notebook server's output, not into the notebook).

 


 Args
  input_   A tensor passed through this op.  
  data   A list of tensors to print out when op is evaluated.  
  message   A string, prefix of the error message.  
  first_n   Only log first_n number of times. Negative numbers log always; this is the default.  
  summarize   Only print this many entries of each tensor. If None, then a maximum of 3 elements are printed per input tensor.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type and contents as input_. sess = tf.compat.v1.Session()
with sess.as_default():
tensor = tf.range(10)
print_op = tf.print(tensor)
with tf.control_dependencies([print_op]):
out = tf.add(tensor, tensor)
sess.run(out)
Module: tf.compat.v1.profiler Public API for tf.profiler namespace. Classes class AdviceProto: A ProtocolMessage class GraphNodeProto: A ProtocolMessage class MultiGraphNodeProto: A ProtocolMessage class OpLogProto: A ProtocolMessage class ProfileOptionBuilder: Option Builder for Profiling API. class Profiler: TensorFlow multi-step profiler. Functions advise(...): Auto profile and advise. profile(...): Profile model. write_op_log(...): Log provided 'op_log', and add additional model information below.
tf.compat.v1.profiler.AdviceProto A ProtocolMessage
 


 Attributes
  checkers   repeated CheckersEntry checkers    Child Classes class Checker class CheckersEntry
tf.compat.v1.profiler.AdviceProto.Checker A ProtocolMessage
 


 Attributes
  reports   repeated string reports
tf.compat.v1.profiler.AdviceProto.CheckersEntry A ProtocolMessage
 


 Attributes
  key   string key  
  value   Checker value
tf.compat.v1.profiler.advise Auto profile and advise. 
tf.compat.v1.profiler.advise(
    graph=None, run_meta=None, options=_DEFAULT_ADVISE_OPTIONS
)
 Builds profiles and automatically check anomalies of various aspects. For more details: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/core/profiler/README.md
 


 Args
  graph   tf.Graph. If None and eager execution is not enabled, use default graph.  
  run_meta   optional tensorflow.RunMetadata proto. It is necessary to to support run time information profiling, such as time and memory.  
  options   see ALL_ADVICE example above. Default checks everything.   
 


 Returns   Returns AdviceProto proto
tf.compat.v1.profiler.GraphNodeProto A ProtocolMessage
 


 Attributes
  accelerator_exec_micros   int64 accelerator_exec_micros  
  children   repeated GraphNodeProto children  
  cpu_exec_micros   int64 cpu_exec_micros  
  devices   repeated string devices  
  exec_micros   int64 exec_micros  
  float_ops   int64 float_ops  
  input_shapes   repeated InputShapesEntry input_shapes  
  name   string name  
  output_bytes   int64 output_bytes  
  parameters   int64 parameters  
  peak_bytes   int64 peak_bytes  
  requested_bytes   int64 requested_bytes  
  residual_bytes   int64 residual_bytes  
  run_count   int64 run_count  
  shapes   repeated TensorShapeProto shapes  
  tensor_value   TFProfTensorProto tensor_value  
  total_accelerator_exec_micros   int64 total_accelerator_exec_micros  
  total_cpu_exec_micros   int64 total_cpu_exec_micros  
  total_definition_count   int64 total_definition_count  
  total_exec_micros   int64 total_exec_micros  
  total_float_ops   int64 total_float_ops  
  total_output_bytes   int64 total_output_bytes  
  total_parameters   int64 total_parameters  
  total_peak_bytes   int64 total_peak_bytes  
  total_requested_bytes   int64 total_requested_bytes  
  total_residual_bytes   int64 total_residual_bytes  
  total_run_count   int64 total_run_count    Child Classes class InputShapesEntry
tf.compat.v1.profiler.GraphNodeProto.InputShapesEntry A ProtocolMessage
 


 Attributes
  key   int32 key  
  value   TensorShapeProto value
tf.compat.v1.profiler.MultiGraphNodeProto A ProtocolMessage
 


 Attributes
  accelerator_exec_micros   int64 accelerator_exec_micros  
  children   repeated MultiGraphNodeProto children  
  cpu_exec_micros   int64 cpu_exec_micros  
  exec_micros   int64 exec_micros  
  float_ops   int64 float_ops  
  graph_nodes   repeated GraphNodeProto graph_nodes  
  name   string name  
  output_bytes   int64 output_bytes  
  parameters   int64 parameters  
  peak_bytes   int64 peak_bytes  
  requested_bytes   int64 requested_bytes  
  residual_bytes   int64 residual_bytes  
  total_accelerator_exec_micros   int64 total_accelerator_exec_micros  
  total_cpu_exec_micros   int64 total_cpu_exec_micros  
  total_exec_micros   int64 total_exec_micros  
  total_float_ops   int64 total_float_ops  
  total_output_bytes   int64 total_output_bytes  
  total_parameters   int64 total_parameters  
  total_peak_bytes   int64 total_peak_bytes  
  total_requested_bytes   int64 total_requested_bytes  
  total_residual_bytes   int64 total_residual_bytes
tf.compat.v1.profiler.OpLogProto A ProtocolMessage
 


 Attributes
  id_to_string   repeated IdToStringEntry id_to_string  
  log_entries   repeated OpLogEntry log_entries    Child Classes class IdToStringEntry
tf.compat.v1.profiler.OpLogProto.IdToStringEntry A ProtocolMessage
 


 Attributes
  key   int64 key  
  value   string value
tf.compat.v1.profiler.profile Profile model. 
tf.compat.v1.profiler.profile(
    graph=None, run_meta=None, op_log=None, cmd='scope',
    options=_DEFAULT_PROFILE_OPTIONS
)
 Tutorials and examples can be found in: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/profiler/g3doc/python_api.md
 


 Args
  graph   tf.Graph. If None and eager execution is not enabled, use default graph.  
  run_meta   optional tensorflow.RunMetadata proto. It is necessary to to support run time information profiling, such as time and memory.  
  op_log   tensorflow.tfprof.OpLogProto proto. User can assign "types" to graph nodes with op_log. "types" allow user to flexibly group and account profiles using options['accounted_type_regexes'].  
  cmd   string. Either 'op', 'scope', 'graph' or 'code'. 'op' view organizes profile using operation type. (e.g. MatMul) 'scope' view organizes profile using graph node name scope. 'graph' view organizes profile using graph node inputs/outputs. 'code' view organizes profile using Python call stack.  
  options   A dict of options. See core/profiler/g3doc/options.md.   
 


 Returns   If cmd is 'scope' or 'graph', returns GraphNodeProto proto. If cmd is 'op' or 'code', returns MultiGraphNodeProto proto. Side effect: stdout/file/timeline.json depending on options['output']
tf.compat.v1.profiler.write_op_log Log provided 'op_log', and add additional model information below. 
tf.compat.v1.profiler.write_op_log(
    graph, log_dir, op_log=None, run_meta=None, add_trace=True
)
 The API also assigns ops in tf.compat.v1.trainable_variables() an op type called '_trainable_variables'. The API also logs 'flops' statistics for ops with op.RegisterStatistics() defined. flops calculation depends on Tensor shapes defined in 'graph', which might not be complete. 'run_meta', if provided, completes the shape information with best effort.
 


 Args
  graph   tf.Graph. If None and eager execution is not enabled, use default graph.  
  log_dir   directory to write the log file.  
  op_log   (Optional) OpLogProto proto to be written. If not provided, an new one is created.  
  run_meta   (Optional) RunMetadata proto that helps flops computation using run time shape information.  
  add_trace   Whether to add python code trace information. Used to support "code" view.
Module: tf.compat.v1.python_io Python functions for directly manipulating TFRecord-formatted files. Classes class TFRecordCompressionType: The type of compression for the record. class TFRecordOptions: Options used for manipulating TFRecord files. class TFRecordWriter: A class to write records to a TFRecords file. Functions tf_record_iterator(...): An iterator that read the records from a TFRecords file. (deprecated)
tf.compat.v1.py_func Wraps a python function and uses it as a TensorFlow op. 
tf.compat.v1.py_func(
    func, inp, Tout, stateful=True, name=None
)
 Given a python function func, which takes numpy arrays as its arguments and returns numpy arrays as its outputs, wrap this function as an operation in a TensorFlow graph. The following snippet constructs a simple TensorFlow graph that invokes the np.sinh() NumPy function as a operation in the graph: def my_func(x):
  # x will be a numpy array with the contents of the placeholder below
  return np.sinh(x)
input = tf.compat.v1.placeholder(tf.float32)
y = tf.compat.v1.py_func(my_func, [input], tf.float32)


Note: The tf.compat.v1.py_func() operation has the following known limitations:
  The body of the function (i.e. func) will not be serialized in a GraphDef. Therefore, you should not use this function if you need to serialize your model and restore it in a different environment. The operation must run in the same address space as the Python program that calls tf.compat.v1.py_func(). If you are using distributed TensorFlow, you must run a tf.distribute.Server in the same process as the program that calls tf.compat.v1.py_func() and you must pin the created operation to a device in that server (e.g. using with tf.device():). 
 


 Args
  func   A Python function, which accepts ndarray objects as arguments and returns a list of ndarray objects (or a single ndarray). This function must accept as many arguments as there are tensors in inp, and these argument types will match the corresponding tf.Tensor objects in inp. The returns ndarrays must match the number and types defined Tout. Important Note: Input and output numpy ndarrays of func are not guaranteed to be copies. In some cases their underlying memory will be shared with the corresponding TensorFlow tensors. In-place modification or storing func input or return values in python datastructures without explicit (np.)copy can have non-deterministic consequences.  
  inp   A list of Tensor objects.  
  Tout   A list or tuple of tensorflow data types or a single tensorflow data type if there is only one, indicating what func returns.  
  stateful   (Boolean.) If True, the function should be considered stateful. If a function is stateless, when given the same input it will return the same output and have no observable side effects. Optimizations such as common subexpression elimination are only performed on stateless operations.  
  name   A name for the operation (optional).   
 


 Returns   A list of Tensor or a single Tensor which func computes.
Module: tf.compat.v1.quantization Public API for tf.quantization namespace. Functions dequantize(...): Dequantize the 'input' tensor into a float or bfloat16 Tensor. fake_quant_with_min_max_args(...): Fake-quantize the 'inputs' tensor, type float to 'outputs' tensor of same type. fake_quant_with_min_max_args_gradient(...): Compute gradients for a FakeQuantWithMinMaxArgs operation. fake_quant_with_min_max_vars(...): Fake-quantize the 'inputs' tensor of type float via global float scalars fake_quant_with_min_max_vars_gradient(...): Compute gradients for a FakeQuantWithMinMaxVars operation. fake_quant_with_min_max_vars_per_channel(...): Fake-quantize the 'inputs' tensor of type float via per-channel floats fake_quant_with_min_max_vars_per_channel_gradient(...): Compute gradients for a FakeQuantWithMinMaxVarsPerChannel operation. quantize(...): Quantize the 'input' tensor of type float to 'output' tensor of type 'T'. quantize_and_dequantize(...): Quantizes then dequantizes a tensor. (deprecated) quantize_and_dequantize_v2(...): Quantizes then dequantizes a tensor. quantized_concat(...): Concatenates quantized tensors along one dimension.
tf.compat.v1.quantize_v2 Please use tf.quantization.quantize instead. 
tf.compat.v1.quantize_v2(
    input, min_range, max_range, T, mode='MIN_COMBINED', name=None,
    round_mode='HALF_AWAY_FROM_ZERO', narrow_range=False, axis=None,
    ensure_minimum_range=0.01
)
Module: tf.compat.v1.queue Public API for tf.queue namespace. Classes class FIFOQueue: A queue implementation that dequeues elements in first-in first-out order. class PaddingFIFOQueue: A FIFOQueue that supports batching variable-sized tensors by padding. class PriorityQueue: A queue implementation that dequeues elements in prioritized order. class QueueBase: Base class for queue implementations. class RandomShuffleQueue: A queue implementation that dequeues elements in a random order.
tf.compat.v1.ragged.constant_value Constructs a RaggedTensorValue from a nested Python list. 
tf.compat.v1.ragged.constant_value(
    pylist, dtype=None, ragged_rank=None, inner_shape=None,
    row_splits_dtype='int64'
)
 Warning: This function returns a RaggedTensorValue, not a RaggedTensor. If you wish to construct a constant RaggedTensor, use ragged.constant(...) instead. Example: 
tf.compat.v1.ragged.constant_value([[1, 2], [3], [4, 5, 6]])
tf.RaggedTensorValue(values=array([1, 2, 3, 4, 5, 6]),
                     row_splits=array([0, 2, 3, 6]))
 All scalar values in pylist must have the same nesting depth K, and the returned RaggedTensorValue will have rank K. If pylist contains no scalar values, then K is one greater than the maximum depth of empty lists in pylist. All scalar values in pylist must be compatible with dtype.
 


 Args
  pylist   A nested list, tuple or np.ndarray. Any nested element that is not a list or tuple must be a scalar value compatible with dtype.  
  dtype   numpy.dtype. The type of elements for the returned RaggedTensor. If not specified, then a default is chosen based on the scalar values in pylist.  
  ragged_rank   An integer specifying the ragged rank of the returned RaggedTensorValue. Must be nonnegative and less than K. Defaults to max(0, K - 1) if inner_shape is not specified. Defaults to `max(0, K  1 - len(inner_shape))ifinner_shapeis specified. </td> </tr><tr> <td>inner_shape</td> <td> A tuple of integers specifying the shape for individual inner values in the returnedRaggedTensorValue. Defaults to()ifragged_rankis not specified. Ifragged_rankis specified, then a default is chosen based on the contents ofpylist. </td> </tr><tr> <td>row_splits_dtype</td> <td> data type for the constructedRaggedTensorValue's row_splits. One ofnumpy.int32ornumpy.int64`. 

  
 


 Returns   A tf.RaggedTensorValue or numpy.array with rank K and the specified ragged_rank, containing the values from pylist.  

 


 Raises
  ValueError   If the scalar values in pylist have inconsistent nesting depth; or if ragged_rank or inner_shape are incompatible with pylist.
tf.compat.v1.ragged.placeholder Creates a placeholder for a tf.RaggedTensor that will always be fed. 
tf.compat.v1.ragged.placeholder(
    dtype, ragged_rank, value_shape=None, name=None
)
 Key Point: This ragged tensor will produce an error if evaluated. Its value must be fed using the feed_dict optional argument to Session.run(), Tensor.eval(), or Operation.run(). @compatibility{eager} Placeholders are not compatible with eager execution.
 


 Args
  dtype   The data type for the RaggedTensor.  
  ragged_rank   The ragged rank for the RaggedTensor  
  value_shape   The shape for individual flat values in the RaggedTensor.  
  name   A name for the operation (optional).   
 


 Returns   A RaggedTensor that may be used as a handle for feeding a value, but not evaluated directly.  

 


 Raises
  RuntimeError   if eager execution is enabled
tf.compat.v1.ragged.RaggedTensorValue Represents the value of a RaggedTensor. 
tf.compat.v1.ragged.RaggedTensorValue(
    values, row_splits
)
 Warning: RaggedTensorValue should only be used in graph mode; in eager mode, the tf.RaggedTensor class contains its value directly. See tf.RaggedTensor for a description of ragged tensors.
 


 Args
  values   A numpy array of any type and shape; or a RaggedTensorValue.  
  row_splits   A 1-D int32 or int64 numpy array.   
 


 Attributes
  dtype   The numpy dtype of values in this tensor.  
  flat_values   The innermost values array for this ragged tensor value.  
  nested_row_splits   The row_splits for all ragged dimensions in this ragged tensor value.  
  ragged_rank   The number of ragged dimensions in this ragged tensor value.  
  row_splits   The split indices for the ragged tensor value.  
  shape   A tuple indicating the shape of this RaggedTensorValue.  
  values   The concatenated values for all rows in this tensor.    Methods to_list View source 
to_list()
 Returns this ragged tensor value as a nested Python list.
Module: tf.compat.v1.random Public API for tf.random namespace. Modules experimental module: Public API for tf.random.experimental namespace. Classes class Algorithm: An enumeration. class Generator: Random-number generator. Functions all_candidate_sampler(...): Generate the set of all classes. categorical(...): Draws samples from a categorical distribution. create_rng_state(...): Creates a RNG state from an integer or a vector. fixed_unigram_candidate_sampler(...): Samples a set of classes using the provided (fixed) base distribution. gamma(...): Draws shape samples from each of the given Gamma distribution(s). get_global_generator(...): Retrieves the global generator. get_seed(...): Returns the local seeds an operation should use given an op-specific seed. learned_unigram_candidate_sampler(...): Samples a set of classes from a distribution learned during training. log_uniform_candidate_sampler(...): Samples a set of classes using a log-uniform (Zipfian) base distribution. multinomial(...): Draws samples from a multinomial distribution. (deprecated) normal(...): Outputs random values from a normal distribution. poisson(...): Draws shape samples from each of the given Poisson distribution(s). set_global_generator(...): Replaces the global generator with another Generator object. set_random_seed(...): Sets the graph-level random seed for the default graph. shuffle(...): Randomly shuffles a tensor along its first dimension. stateless_binomial(...): Outputs deterministic pseudorandom values from a binomial distribution. stateless_categorical(...): Draws deterministic pseudorandom samples from a categorical distribution. stateless_gamma(...): Outputs deterministic pseudorandom values from a gamma distribution. stateless_multinomial(...): Draws deterministic pseudorandom samples from a multinomial distribution. (deprecated) stateless_normal(...): Outputs deterministic pseudorandom values from a normal distribution. stateless_parameterized_truncated_normal(...): Outputs random values from a truncated normal distribution. stateless_poisson(...): Outputs deterministic pseudorandom values from a Poisson distribution. stateless_truncated_normal(...): Outputs deterministic pseudorandom values, truncated normally distributed. stateless_uniform(...): Outputs deterministic pseudorandom values from a uniform distribution. truncated_normal(...): Outputs random values from a truncated normal distribution. uniform(...): Outputs random values from a uniform distribution. uniform_candidate_sampler(...): Samples a set of classes using a uniform base distribution.
Module: tf.compat.v1.random.experimental Public API for tf.random.experimental namespace. Classes class Algorithm: An enumeration. class Generator: Random-number generator. Functions create_rng_state(...): Creates a RNG state from an integer or a vector. get_global_generator(...): Retrieves the global generator. set_global_generator(...): Replaces the global generator with another Generator object. stateless_fold_in(...): Folds in data to an RNG seed to form a new RNG seed. stateless_split(...): Splits an RNG seed into num new seeds by adding a leading axis.
tf.compat.v1.random.stateless_multinomial Draws deterministic pseudorandom samples from a multinomial distribution. (deprecated) 
tf.compat.v1.random.stateless_multinomial(
    logits, num_samples, seed, output_dtype=tf.dtypes.int64, name=None
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.random.stateless_categorical instead. This is a stateless version of tf.random.categorical: if run twice with the same seeds and shapes, it will produce the same pseudorandom numbers. The output is consistent across multiple runs on the same hardware (and between CPU and GPU), but may change between versions of TensorFlow or on non-CPU/GPU hardware. Example: # samples has shape [1, 5], where each value is either 0 or 1 with equal
# probability.
samples = tf.random.stateless_categorical(
    tf.math.log([[0.5, 0.5]]), 5, seed=[7, 17])

 


 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 shape [2] Tensor, the seed to the random number generator. Must have dtype int32 or int64. (When using XLA, only int32 is allowed.)  
  output_dtype   integer type to use for the output. Defaults to int64.  
  name   Optional name for the operation.   
 


 Returns   The drawn samples of shape [batch_size, num_samples].
tf.compat.v1.random_normal_initializer Initializer that generates tensors with a normal distribution.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.initializers.random_normal  
tf.compat.v1.random_normal_initializer(
    mean=0.0, stddev=1.0, seed=None, dtype=tf.dtypes.float32
)

 


 Args
  mean   a python scalar or a scalar tensor. Mean of the random values to generate.  
  stddev   a python scalar or a scalar tensor. Standard deviation of the random values to generate.  
  seed   A Python integer. Used to create random seeds. See tf.compat.v1.set_random_seed for behavior.  
  dtype   Default data type, used if no dtype argument is provided when calling the initializer. Only floating point types are supported.    Methods from_config View source 
@classmethod
from_config(
    config
)
 Instantiates an initializer from a configuration dictionary. Example: initializer = RandomUniform(-1, 1)
config = initializer.get_config()
initializer = RandomUniform.from_config(config)

 


 Args
  config   A Python dictionary. It will typically be the output of get_config.   
 


 Returns   An Initializer instance.  
 get_config View source 
get_config()
 Returns the configuration of the initializer as a JSON-serializable dict.
 


 Returns   A JSON-serializable Python dict.  
 __call__ View source 
__call__(
    shape, dtype=None, partition_info=None
)
 Returns a tensor object initialized as specified by the initializer.
 


 Args
  shape   Shape of the tensor.  
  dtype   Optional dtype of the tensor. If not provided use the initializer dtype.  
  partition_info   Optional information about the possible partitioning of a tensor.