neulab/docprompting-conala huggingface dataset:
tf.compat.v1.data.make_initializable_iterator Creates an iterator for elements of dataset. 
tf.compat.v1.data.make_initializable_iterator(
    dataset, shared_name=None
)
 
Note: The returned iterator will be in an uninitialized state, and you must run the iterator.initializer operation before using it:

dataset = ...
iterator = tf.compat.v1.data.make_initializable_iterator(dataset)
# ...
sess.run(iterator.initializer)

 


 Args
  dataset   A tf.data.Dataset.  
  shared_name   (Optional.) If non-empty, the returned iterator will be shared under the given name across multiple sessions that share the same devices (e.g. when using a remote server).   
 


 Returns   A tf.data.Iterator for elements of dataset.  

 


 Raises
  RuntimeError   If eager execution is enabled.
tf.compat.v1.data.make_one_shot_iterator Creates an iterator for elements of dataset. 
tf.compat.v1.data.make_one_shot_iterator(
    dataset
)
 
Note: The returned iterator will be initialized automatically. A "one-shot" iterator does not support re-initialization.

 


 Args
  dataset   A tf.data.Dataset.   
 


 Returns   A tf.data.Iterator for elements of dataset.
Module: tf.compat.v1.debugging Public API for tf.debugging namespace. Modules experimental module: Public API for tf.debugging.experimental namespace. Functions Assert(...): Asserts that the given condition is true. assert_all_finite(...): Assert that the tensor does not contain any NaN's or Inf's. assert_equal(...): Assert the condition x == y holds element-wise. assert_greater(...): Assert the condition x > y holds element-wise. assert_greater_equal(...): Assert the condition x >= y holds element-wise. assert_integer(...): Assert that x is of integer dtype. assert_less(...): Assert the condition x < y holds element-wise. assert_less_equal(...): Assert the condition x <= y holds element-wise. assert_near(...): Assert the condition x and y are close element-wise. assert_negative(...): Assert the condition x < 0 holds element-wise. assert_non_negative(...): Assert the condition x >= 0 holds element-wise. assert_non_positive(...): Assert the condition x <= 0 holds element-wise. assert_none_equal(...): Assert the condition x != y holds element-wise. assert_positive(...): Assert the condition x > 0 holds element-wise. assert_proper_iterable(...): Static assert that values is a "proper" iterable. assert_rank(...): Assert x has rank equal to rank. assert_rank_at_least(...): Assert x has rank equal to rank or higher. assert_rank_in(...): Assert x has rank in ranks. assert_same_float_dtype(...): Validate and return float type based on tensors and dtype. assert_scalar(...): Asserts that the given tensor is a scalar (i.e. zero-dimensional). assert_shapes(...): Assert tensor shapes and dimension size relationships between tensors. assert_type(...): Statically asserts that the given Tensor is of the specified type. check_numerics(...): Checks a tensor for NaN and Inf values. disable_check_numerics(...): Disable the eager/graph unified numerics checking mechanism. enable_check_numerics(...): Enable tensor numerics checking in an eager/graph unified fashion. get_log_device_placement(...): Get if device placements are logged. is_finite(...): Returns which elements of x are finite. is_inf(...): Returns which elements of x are Inf. is_nan(...): Returns which elements of x are NaN. is_non_decreasing(...): Returns True if x is non-decreasing. is_numeric_tensor(...): Returns True if the elements of tensor are numbers. is_strictly_increasing(...): Returns True if x is strictly increasing. set_log_device_placement(...): Set if device placements should be logged.
tf.compat.v1.debugging.assert_shapes Assert tensor shapes and dimension size relationships between tensors. 
tf.compat.v1.debugging.assert_shapes(
    shapes, data=None, summarize=None, message=None, name=None
)
 This Op checks that a collection of tensors shape relationships satisfies given constraints. Example: 
n = 10
q = 3
d = 7
x = tf.zeros([n,q])
y = tf.ones([n,d])
param = tf.Variable([1.0, 2.0, 3.0])
scalar = 1.0
tf.debugging.assert_shapes([
 (x, ('N', 'Q')),
 (y, ('N', 'D')),
 (param, ('Q',)),
 (scalar, ()),
])
 
tf.debugging.assert_shapes([
  (x, ('N', 'D')),
  (y, ('N', 'D'))
])
Traceback (most recent call last):

ValueError: ...
 Example of adding a dependency to an operation: with tf.control_dependencies([tf.assert_shapes(shapes)]):
  output = tf.matmul(x, y, transpose_a=True)
 If x, y, param or scalar does not have a shape that satisfies all specified constraints, message, as well as the first summarize entries of the first encountered violating tensor are printed, and InvalidArgumentError is raised. Size entries in the specified shapes are checked against other entries by their hash, except:  a size entry is interpreted as an explicit size if it can be parsed as an integer primitive. a size entry is interpreted as any size if it is None or '.'.  If the first entry of a shape is ... (type Ellipsis) or '*' that indicates a variable number of outer dimensions of unspecified size, i.e. the constraint applies to the inner-most dimensions only. Scalar tensors and specified shapes of length zero (excluding the 'inner-most' prefix) are both treated as having a single dimension of size one.
 


 Args
  shapes   A list of (Tensor, shape) tuples, wherein shape is the expected shape of Tensor. See the example code above. The shape must be an iterable. Each element of the iterable can be either a concrete integer value or a string that abstractly represents the dimension. For example,  
('N', 'Q') specifies a 2D shape wherein the first and second dimensions of shape may or may not be equal. 
('N', 'N', 'Q') specifies a 3D shape wherein the first and second dimensions are equal. 
(1, 'N') specifies a 2D shape wherein the first dimension is exactly 1 and the second dimension can be any value. Note that the abstract dimension letters take effect across different tuple elements of the list. For example, tf.debugging.assert_shapes([(x, ('N', 'A')), (y, ('N', 'B'))] asserts that both x and y are rank-2 tensors and their first dimensions are equal (N). shape can also be a tf.TensorShape. 

 
  data   The tensors to print out if the condition is False. Defaults to error message and first few entries of the violating tensor.  
  summarize   Print this many entries of the tensor.  
  message   A string to prefix to the default message.  
  name   A name for this operation (optional). Defaults to "assert_shapes".   
 


 Returns   Op raising InvalidArgumentError unless all shape constraints are satisfied. If static checks determine all constraints are satisfied, a no_op is returned.  

 


 Raises
  ValueError   If static checks determine any shape constraint is violated.
Module: tf.compat.v1.debugging.experimental Public API for tf.debugging.experimental namespace. Functions disable_dump_debug_info(...): Disable the currently-enabled debugging dumping. enable_dump_debug_info(...): Enable dumping debugging information from a TensorFlow program.
tf.compat.v1.decode_csv Convert CSV records to tensors. Each column maps to one tensor.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.io.decode_csv  
tf.compat.v1.decode_csv(
    records, record_defaults, field_delim=',', use_quote_delim=True,
    name=None, na_value='', select_cols=None
)
 RFC 4180 format is expected for the CSV records. (https://tools.ietf.org/html/rfc4180) Note that we allow leading and trailing spaces with int or float field.
 


 Args
  records   A Tensor of type string. Each string is a record/row in the csv and all records should have the same format.  
  record_defaults   A list of Tensor objects with specific types. Acceptable types are float32, float64, int32, int64, string. One tensor per column of the input record, with either a scalar default value for that column or an empty vector if the column is required.  
  field_delim   An optional string. Defaults to ",". char delimiter to separate fields in a record.  
  use_quote_delim   An optional bool. Defaults to True. If false, treats double quotation marks as regular characters inside of the string fields (ignoring RFC 4180, Section 2, Bullet 5).  
  name   A name for the operation (optional).  
  na_value   Additional string to recognize as NA/NaN.  
  select_cols   Optional sorted list of column indices to select. If specified, only this subset of columns will be parsed and returned.   
 


 Returns   A list of Tensor objects. Has the same type as record_defaults. Each tensor will have the same shape as records.  

 


 Raises
  ValueError   If any of the arguments is malformed.
tf.compat.v1.decode_raw Convert raw byte strings into tensors. (deprecated arguments)  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.io.decode_raw  
tf.compat.v1.decode_raw(
    input_bytes=None, out_type=None, little_endian=True, name=None, bytes=None
)
 Warning: SOME ARGUMENTS ARE DEPRECATED: (bytes). They will be removed in a future version. Instructions for updating: bytes is deprecated, use input_bytes instead
 


 Args
  input_bytes   Each element of the input Tensor is converted to an array of bytes.  
  out_type   DType of the output. Acceptable types are half, float, double, int32, uint16, uint8, int16, int8, int64.  
  little_endian   Whether the input_bytes data is in little-endian format. Data will be converted into host byte order if necessary.  
  name   A name for the operation (optional).  
  bytes   Deprecated parameter. Use input_bytes instead.   
 


 Returns   A Tensor object storing the decoded bytes.
tf.compat.v1.delete_session_tensor Delete the tensor for the given tensor handle. 
tf.compat.v1.delete_session_tensor(
    handle, name=None
)
 This is EXPERIMENTAL and subject to change. Delete the tensor of a given tensor handle. The tensor is produced in a previous run() and stored in the state of the session.
 


 Args
  handle   The string representation of a persistent tensor handle.  
  name   Optional name prefix for the return tensor.   
 


 Returns   A pair of graph elements. The first is a placeholder for feeding a tensor handle and the second is a deletion operation.
tf.compat.v1.device Wrapper for Graph.device() using the default graph. 
tf.compat.v1.device(
    device_name_or_function
)
 See tf.Graph.device for more details.
 


 Args
  device_name_or_function   The device name or function to use in the context.   
 


 Returns   A context manager that specifies the default device to use for newly created ops.  

 


 Raises
  RuntimeError   If eager execution is enabled and a function is passed in.
tf.compat.v1.disable_control_flow_v2 Opts out of control flow v2. 
tf.compat.v1.disable_control_flow_v2()
 
Note: v2 control flow is always enabled inside of tf.function. Calling this function has no effect in that case.
 If your code needs tf.disable_control_flow_v2() to be called to work properly please file a bug.
tf.compat.v1.disable_eager_execution Disables eager execution. 
tf.compat.v1.disable_eager_execution()
 This function can only be called before any Graphs, Ops, or Tensors have been created. It can be used at the beginning of the program for complex migration projects from TensorFlow 1.x to 2.x.
tf.compat.v1.disable_resource_variables Opts out of resource variables. (deprecated) 
tf.compat.v1.disable_resource_variables()
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: non-resource variables are not supported in the long term If your code needs tf.disable_resource_variables() to be called to work properly please file a bug.
tf.compat.v1.disable_tensor_equality Compare Tensors by their id and be hashable. 
tf.compat.v1.disable_tensor_equality()
 This is a legacy behaviour of TensorFlow and is highly discouraged.
tf.compat.v1.disable_v2_behavior Disables TensorFlow 2.x behaviors. 
tf.compat.v1.disable_v2_behavior()
 This function can be called at the beginning of the program (before Tensors, Graphs or other structures have been created, and before devices have been initialized. It switches all global behaviors that are different between TensorFlow 1.x and 2.x to behave as intended for 1.x. User can call this function to disable 2.x behavior during complex migrations.
tf.compat.v1.disable_v2_tensorshape Disables the V2 TensorShape behavior and reverts to V1 behavior. 
tf.compat.v1.disable_v2_tensorshape()
 See docstring for enable_v2_tensorshape for details about the new behavior.
Module: tf.compat.v1.distribute.cluster_resolver Library imports for ClusterResolvers. This library contains all implementations of ClusterResolvers. ClusterResolvers are a way of specifying cluster information for distributed execution. Built on top of existing ClusterSpec framework, ClusterResolvers are a way for TensorFlow to communicate with various cluster management systems (e.g. GCE, AWS, etc...). Classes class ClusterResolver: Abstract class for all implementations of ClusterResolvers. class GCEClusterResolver: ClusterResolver for Google Compute Engine. class KubernetesClusterResolver: ClusterResolver for Kubernetes. class SimpleClusterResolver: Simple implementation of ClusterResolver that accepts all attributes. class SlurmClusterResolver: ClusterResolver for system with Slurm workload manager. class TFConfigClusterResolver: Implementation of a ClusterResolver which reads the TF_CONFIG EnvVar. class TPUClusterResolver: Cluster Resolver for Google Cloud TPUs. class UnionResolver: Performs a union on underlying ClusterResolvers.
Module: tf.compat.v1.distribute.experimental Public API for tf.distribute.experimental namespace. Classes class CentralStorageStrategy: A one-machine strategy that puts all variables on a single device. class CollectiveCommunication: Cross device communication implementation. class CollectiveHints: Hints for collective operations like AllReduce. class CommunicationImplementation: Cross device communication implementation. class CommunicationOptions: Options for cross device communications like All-reduce. class MultiWorkerMirroredStrategy: A distribution strategy for synchronous training on multiple workers. class ParameterServerStrategy: An asynchronous multi-worker parameter server tf.distribute strategy. class TPUStrategy: TPU distribution strategy implementation.
tf.compat.v1.distribute.get_loss_reduction tf.distribute.ReduceOp corresponding to the last loss reduction. 
tf.compat.v1.distribute.get_loss_reduction()
 This is used to decide whether loss should be scaled in optimizer (used only for estimator + v1 optimizer use case).
 


 Returns   tf.distribute.ReduceOp corresponding to the last loss reduction for estimator and v1 optimizer use case. tf.distribute.ReduceOp.SUM otherwise.
Module: tf.compat.v1.distributions Core module for TensorFlow distribution objects and helpers. Classes class Bernoulli: Bernoulli distribution. class Beta: Beta distribution. class Categorical: Categorical distribution. class Dirichlet: Dirichlet distribution. class DirichletMultinomial: Dirichlet-Multinomial compound distribution. class Distribution: A generic probability distribution base class. class Exponential: Exponential distribution. class Gamma: Gamma distribution. class Laplace: The Laplace distribution with location loc and scale parameters. class Multinomial: Multinomial distribution. class Normal: The Normal distribution with location loc and scale parameters. class RegisterKL: Decorator to register a KL divergence implementation function. class ReparameterizationType: Instances of this class represent how sampling is reparameterized. class StudentT: Student's t-distribution. class Uniform: Uniform distribution with low and high parameters. Functions kl_divergence(...): Get the KL-divergence KL(distribution_a || distribution_b). (deprecated)
 


 Other Members
  FULLY_REPARAMETERIZED   tf.compat.v1.distributions.ReparameterizationType  
  NOT_REPARAMETERIZED   tf.compat.v1.distributions.ReparameterizationType
tf.compat.v1.distributions.kl_divergence Get the KL-divergence KL(distribution_a || distribution_b). (deprecated) 
tf.compat.v1.distributions.kl_divergence(
    distribution_a, distribution_b, allow_nan_stats=True, name=None
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed after 2019-01-01. Instructions for updating: The TensorFlow Distributions library has moved to TensorFlow Probability (https://github.com/tensorflow/probability). You should update all references to use tfp.distributions instead of tf.distributions. If there is no KL method registered specifically for type(distribution_a) and type(distribution_b), then the class hierarchies of these types are searched. If one KL method is registered between any pairs of classes in these two parent hierarchies, it is used. If more than one such registered method exists, the method whose registered classes have the shortest sum MRO paths to the input types is used. If more than one such shortest path exists, the first method identified in the search is used (favoring a shorter MRO distance to type(distribution_a)).
 


 Args
  distribution_a   The first distribution.  
  distribution_b   The second distribution.  
  allow_nan_stats   Python bool, default True. When True, statistics (e.g., mean, mode, variance) use the value "NaN" to indicate the result is undefined. When False, an exception is raised if one or more of the statistic's batch members are undefined.  
  name   Python str name prefixed to Ops created by this class.   
 


 Returns   A Tensor with the batchwise KL-divergence between distribution_a and distribution_b.  

 


 Raises
  NotImplementedError   If no KL method is defined for distribution types of distribution_a and distribution_b.
tf.compat.v1.distributions.RegisterKL Decorator to register a KL divergence implementation function. 
tf.compat.v1.distributions.RegisterKL(
    dist_cls_a, dist_cls_b
)
 Usage: @distributions.RegisterKL(distributions.Normal, distributions.Normal) def _kl_normal_mvn(norm_a, norm_b): # Return KL(norm_a || norm_b)
 


 Args
  dist_cls_a   the class of the first argument of the KL divergence.  
  dist_cls_b   the class of the second argument of the KL divergence.    Methods __call__ View source 
__call__(
    kl_fn
)
 Perform the KL registration.
 


 Args
  kl_fn   The function to use for the KL divergence.   
 


 Returns   kl_fn  

 


 Raises
  TypeError   if kl_fn is not a callable.  
  ValueError   if a KL divergence function has already been registered for the given argument classes.
tf.compat.v1.distributions.ReparameterizationType Instances of this class represent how sampling is reparameterized. 
tf.compat.v1.distributions.ReparameterizationType(
    rep_type
)
 Two static instances exist in the distributions library, signifying one of two possible properties for samples from a distribution: FULLY_REPARAMETERIZED: Samples from the distribution are fully reparameterized, and straight-through gradients are supported. NOT_REPARAMETERIZED: Samples from the distribution are not fully reparameterized, and straight-through gradients are either partially unsupported or are not supported at all. In this case, for purposes of e.g. RL or variational inference, it is generally safest to wrap the sample results in a stop_gradients call and use policy gradients / surrogate loss instead. Methods __eq__ View source 
__eq__(
    other
)
 Determine if this ReparameterizationType is equal to another. Since ReparameterizationType instances are constant static global instances, equality checks if two instances' id() values are equal.
 


 Args
  other   Object to compare against.   
 


 Returns   self is other.
Module: tf.compat.v1.dtypes Public API for tf.dtypes namespace. Classes class DType: Represents the type of the elements in a Tensor. Functions as_dtype(...): Converts the given type_value to a DType. as_string(...): Converts each entry in the given tensor to strings. cast(...): Casts a tensor to a new type. complex(...): Converts two real numbers to a complex number. saturate_cast(...): Performs a safe saturating cast of value to dtype.
 


 Other Members
  QUANTIZED_DTYPES  
 
  bfloat16   tf.dtypes.DType  
  bool   tf.dtypes.DType  
  complex128   tf.dtypes.DType  
  complex64   tf.dtypes.DType  
  double   tf.dtypes.DType  
  float16   tf.dtypes.DType  
  float32   tf.dtypes.DType  
  float64   tf.dtypes.DType  
  half   tf.dtypes.DType  
  int16   tf.dtypes.DType  
  int32   tf.dtypes.DType  
  int64   tf.dtypes.DType  
  int8   tf.dtypes.DType  
  qint16   tf.dtypes.DType  
  qint32   tf.dtypes.DType  
  qint8   tf.dtypes.DType  
  quint16   tf.dtypes.DType  
  quint8   tf.dtypes.DType  
  resource   tf.dtypes.DType  
  string   tf.dtypes.DType  
  uint16   tf.dtypes.DType  
  uint32   tf.dtypes.DType  
  uint64   tf.dtypes.DType  
  uint8   tf.dtypes.DType  
  variant   tf.dtypes.DType
tf.compat.v1.enable_control_flow_v2 Use control flow v2. 
tf.compat.v1.enable_control_flow_v2()
 control flow v2 (cfv2) is an improved version of control flow in TensorFlow with support for higher order derivatives. Enabling cfv2 will change the graph/function representation of control flow, e.g., tf.while_loop and tf.cond will generate functional While and If ops instead of low-level Switch, Merge etc. ops. Note: Importing and running graphs exported with old control flow will still be supported. Calling tf.enable_control_flow_v2() lets you opt-in to this TensorFlow 2.0 feature. 
Note: v2 control flow is always enabled inside of tf.function. Calling this function is not required.