neulab/docprompting-conala huggingface dataset:
tf.compat.v1.experimental.output_all_intermediates Whether to output all intermediates from functional control flow ops. 
tf.compat.v1.experimental.output_all_intermediates(
    state
)
 The "default" behavior to is to output all intermediates when using v2 control flow inside Keras models in graph mode (possibly inside Estimators). This is needed to support taking gradients of v2 control flow. In graph mode, Keras can sometimes freeze the forward graph before the gradient computation which does not work for v2 control flow since it requires updating the forward ops to output the needed intermediates. We work around this by proactively outputting the needed intermediates when building the forward pass itself. Ideally any such extra tensors should be pruned out at runtime. However, if for any reason this doesn't work for you or if you have an inference-only model you can turn this behavior off using tf.compat.v1.experimental.output_all_intermediates(False). If with the default behavior you are still seeing errors of the form "Connecting to invalid output X of source node Y which has Z outputs" try setting tf.compat.v1.experimental.output_all_intermediates(True) and please file an issue at https://github.com/tensorflow/tensorflow/issues.
 


 Args
  state   True, False or None. None restores the default behavior.
tf.compat.v1.extract_image_patches Extract patches from images and put them in the "depth" output dimension.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.image.extract_image_patches  
tf.compat.v1.extract_image_patches(
    images, ksizes=None, strides=None, rates=None, padding=None, name=None,
    sizes=None
)

 


 Args
  images   A Tensor. Must be one of the following types: bfloat16, half, float32, float64, int8, int16, int32, int64, uint8, uint16, uint32, uint64, complex64, complex128, bool. 4-D Tensor with shape [batch, in_rows, in_cols, depth].  
  ksizes   A list of ints that has length >= 4. The size of the sliding window for each dimension of images.  
  strides   A list of ints that has length >= 4. How far the centers of two consecutive patches are in the images. Must be: [1, stride_rows, stride_cols, 1].  
  rates   A list of ints that has length >= 4. Must be: [1, rate_rows, rate_cols, 1]. This is the input stride, specifying how far two consecutive patch samples are in the input. Equivalent to extracting patches with patch_sizes_eff = patch_sizes + (patch_sizes - 1) * (rates - 1), followed by subsampling them spatially by a factor of rates. This is equivalent to rate in dilated (a.k.a. Atrous) convolutions.  
  padding   A string from: "SAME", "VALID". The type of padding algorithm to use.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as images.
Module: tf.compat.v1.feature_column Public API for tf.feature_column namespace. Functions bucketized_column(...): Represents discretized dense input bucketed by boundaries. categorical_column_with_hash_bucket(...): Represents sparse feature where ids are set by hashing. categorical_column_with_identity(...): A CategoricalColumn that returns identity values. categorical_column_with_vocabulary_file(...): A CategoricalColumn with a vocabulary file. categorical_column_with_vocabulary_list(...): A CategoricalColumn with in-memory vocabulary. crossed_column(...): Returns a column for performing crosses of categorical features. embedding_column(...): DenseColumn that converts from sparse, categorical input. indicator_column(...): Represents multi-hot representation of given categorical column. input_layer(...): Returns a dense Tensor as input layer based on given feature_columns. linear_model(...): Returns a linear prediction Tensor based on given feature_columns. make_parse_example_spec(...): Creates parsing spec dictionary from input feature_columns. numeric_column(...): Represents real valued or numerical features. sequence_categorical_column_with_hash_bucket(...): A sequence of categorical terms where ids are set by hashing. sequence_categorical_column_with_identity(...): Returns a feature column that represents sequences of integers. sequence_categorical_column_with_vocabulary_file(...): A sequence of categorical terms where ids use a vocabulary file. sequence_categorical_column_with_vocabulary_list(...): A sequence of categorical terms where ids use an in-memory list. sequence_numeric_column(...): Returns a feature column that represents sequences of numeric data. shared_embedding_columns(...): List of dense columns that convert from sparse, categorical input. weighted_categorical_column(...): Applies weight values to a CategoricalColumn.
tf.compat.v1.feature_column.input_layer Returns a dense Tensor as input layer based on given feature_columns. 
tf.compat.v1.feature_column.input_layer(
    features, feature_columns, weight_collections=None, trainable=True,
    cols_to_vars=None, cols_to_output_tensors=None
)
 Generally a single example in training data is described with FeatureColumns. At the first layer of the model, this column oriented data should be converted to a single Tensor. Example: price = numeric_column('price')
keywords_embedded = embedding_column(
    categorical_column_with_hash_bucket("keywords", 10K), dimensions=16)
columns = [price, keywords_embedded, ...]
features = tf.io.parse_example(..., features=make_parse_example_spec(columns))
dense_tensor = input_layer(features, columns)
for units in [128, 64, 32]:
  dense_tensor = tf.compat.v1.layers.dense(dense_tensor, units, tf.nn.relu)
prediction = tf.compat.v1.layers.dense(dense_tensor, 1)

 


 Args
  features   A mapping from key to tensors. _FeatureColumns look up via these keys. For example numeric_column('price') will look at 'price' key in this dict. Values can be a SparseTensor or a Tensor depends on corresponding _FeatureColumn.  
  feature_columns   An iterable containing the FeatureColumns to use as inputs to your model. All items should be instances of classes derived from _DenseColumn such as numeric_column, embedding_column, bucketized_column, indicator_column. If you have categorical features, you can wrap them with an embedding_column or indicator_column.  
  weight_collections   A list of collection names to which the Variable will be added. Note that variables will also be added to collections tf.GraphKeys.GLOBAL_VARIABLES and ops.GraphKeys.MODEL_VARIABLES.  
  trainable   If True also add the variable to the graph collection GraphKeys.TRAINABLE_VARIABLES (see tf.Variable).  
  cols_to_vars   If not None, must be a dictionary that will be filled with a mapping from _FeatureColumn to list of Variables. For example, after the call, we might have cols_to_vars = {_EmbeddingColumn( categorical_column=_HashedCategoricalColumn( key='sparse_feature', hash_bucket_size=5, dtype=tf.string), dimension=10): [ 


  cols_to_output_tensors   If not None, must be a dictionary that will be filled with a mapping from '_FeatureColumn' to the associated output Tensors.   
 


 Returns   A Tensor which represents input layer of a model. Its shape is (batch_size, first_layer_dimension) and its dtype is float32. first_layer_dimension is determined based on given feature_columns.  

 


 Raises
  ValueError   if an item in feature_columns is not a _DenseColumn.
tf.compat.v1.feature_column.make_parse_example_spec Creates parsing spec dictionary from input feature_columns. 
tf.compat.v1.feature_column.make_parse_example_spec(
    feature_columns
)
 The returned dictionary can be used as arg 'features' in tf.io.parse_example. Typical usage example: # Define features and transformations
feature_a = categorical_column_with_vocabulary_file(...)
feature_b = numeric_column(...)
feature_c_bucketized = bucketized_column(numeric_column("feature_c"), ...)
feature_a_x_feature_c = crossed_column(
    columns=["feature_a", feature_c_bucketized], ...)

feature_columns = set(
    [feature_b, feature_c_bucketized, feature_a_x_feature_c])
features = tf.io.parse_example(
    serialized=serialized_examples,
    features=make_parse_example_spec(feature_columns))
 For the above example, make_parse_example_spec would return the dict: {
    "feature_a": parsing_ops.VarLenFeature(tf.string),
    "feature_b": parsing_ops.FixedLenFeature([1], dtype=tf.float32),
    "feature_c": parsing_ops.FixedLenFeature([1], dtype=tf.float32)
}

 


 Args
  feature_columns   An iterable containing all feature columns. All items should be instances of classes derived from _FeatureColumn.   
 


 Returns   A dict mapping each feature key to a FixedLenFeature or VarLenFeature value.  

 


 Raises
  ValueError   If any of the given feature_columns is not a _FeatureColumn instance.
tf.compat.v1.fixed_size_partitioner Partitioner to specify a fixed number of shards along given axis. 
tf.compat.v1.fixed_size_partitioner(
    num_shards, axis=0
)

 


 Args
  num_shards   int, number of shards to partition variable.  
  axis   int, axis to partition on.   
 


 Returns   A partition function usable as the partitioner argument to variable_scope and get_variable.
tf.compat.v1.flags.adopt_module_key_flags Declares that all flags key to a module are key to the current module.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.adopt_module_key_flags  
tf.compat.v1.flags.adopt_module_key_flags(
    module, flag_values=_flagvalues.FLAGS
)

 


 Args
  module   module, the module object from which all key flags will be declared as key flags to the current module.  
  flag_values   FlagValues, the FlagValues instance in which the flags will be declared as key flags. This should almost never need to be overridden.   
 


 Raises
  Error   Raised when given an argument that is a module name (a string), instead of a module object.
tf.compat.v1.flags.ArgumentParser Base class used to parse and convert arguments.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.ArgumentParser  The parse() method checks to make sure that the string argument is a legal value and convert it to a native type. If the value cannot be converted, it should throw a 'ValueError' exception with a human readable explanation of why the value is illegal. Subclasses should also define a syntactic_help string which may be presented to the user to describe the form of the legal values. Argument parser classes must be stateless, since instances are cached and shared between flags. Initializer arguments are allowed, but all member variables must be derived from initializer arguments only. Methods flag_type 
flag_type()
 Returns a string representing the type of the flag. parse 
parse(
    argument
)
 Parses the string argument and returns the native value. By default it returns its argument unmodified.
 


 Args
  argument   string argument passed in the commandline.   
 


 Raises
  ValueError   Raised when it fails to parse the argument.  
  TypeError   Raised when the argument has the wrong type.   
 


 Returns   The parsed value in native type.  

 


 Class Variables
  syntactic_help   ''
tf.compat.v1.flags.ArgumentSerializer Base class for generating string representations of a flag value.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.ArgumentSerializer  Methods serialize 
serialize(
    value
)
 Returns a serialized string of the value.
tf.compat.v1.flags.BaseListParser Base class for a parser of lists of strings. Inherits From: ArgumentParser  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.BaseListParser  
tf.compat.v1.flags.BaseListParser(
    token=None, name=None
)
 To extend, inherit from this class; from the subclass init, call BaseListParser.__init__(self, token, name)
 where token is a character used to tokenize, and name is a description of the separator. Methods flag_type 
flag_type()
 See base class. parse 
parse(
    argument
)
 See base class.
 


 Class Variables
  syntactic_help   ''
tf.compat.v1.flags.BooleanFlag Basic boolean flag. Inherits From: Flag  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.BooleanFlag  
tf.compat.v1.flags.BooleanFlag(
    name, default, help, short_name=None, **args
)
 Boolean flags do not take any arguments, and their value is either True (1) or False (0). The false value is specified on the command line by prepending the word 'no' to either the long or the short flag name. For example, if a Boolean flag was created whose long name was 'update' and whose short name was 'x', then this flag could be explicitly unset through either --noupdate or --nox.
 


 Attributes
  value  
   Methods flag_type 
flag_type()
 Returns a str that describes the type of the flag. 
Note: we use strings, and not the types.*Type constants because our flags can have more exotic types, e.g., 'comma separated list of strings', 'whitespace separated list of strings', etc.
 parse 
parse(
    argument
)
 Parses string and sets flag value.
 


 Args
  argument   str or the correct flag value type, argument to be parsed.    serialize 
serialize()
 Serializes the flag. unparse 
unparse()
 __eq__ 
__eq__(
    other
)
 Return self==value. __ge__ 
__ge__(
    other, NotImplemented=NotImplemented
)
 Return a >= b. Computed by @total_ordering from (not a < b). __gt__ 
__gt__(
    other, NotImplemented=NotImplemented
)
 Return a > b. Computed by @total_ordering from (not a < b) and (a != b). __le__ 
__le__(
    other, NotImplemented=NotImplemented
)
 Return a <= b. Computed by @total_ordering from (a < b) or (a == b). __lt__ 
__lt__(
    other
)
 Return self<value.
tf.compat.v1.flags.BooleanParser Parser of boolean values. Inherits From: ArgumentParser  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.BooleanParser  Methods flag_type 
flag_type()
 See base class. parse 
parse(
    argument
)
 See base class.
 


 Class Variables
  syntactic_help   ''
tf.compat.v1.flags.CantOpenFlagFileError Raised when flagfile fails to open. Inherits From: Error  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.CantOpenFlagFileError  E.g. the file doesn't exist, or has wrong permissions.
tf.compat.v1.flags.CsvListSerializer Base class for generating string representations of a flag value. Inherits From: ArgumentSerializer  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.CsvListSerializer  
tf.compat.v1.flags.CsvListSerializer(
    list_sep
)
 Methods serialize 
serialize(
    value
)
 Serializes a list as a CSV string or unicode.
tf.compat.v1.flags.declare_key_flag Declares one flag as key to the current module.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.declare_key_flag  
tf.compat.v1.flags.declare_key_flag(
    flag_name, flag_values=_flagvalues.FLAGS
)
 Key flags are flags that are deemed really important for a module. They are important when listing help messages; e.g., if the --helpshort command-line flag is used, then only the key flags of the main module are listed (instead of all flags, as in the case of --helpfull). Sample usage: flags.declare_key_flag('flag_1')
 


 Args
  flag_name   str, the name of an already declared flag. (Redeclaring flags as key, including flags implicitly key because they were declared in this module, is a no-op.)  
  flag_values   FlagValues, the FlagValues instance in which the flag will be declared as a key flag. This should almost never need to be overridden.   
 


 Raises
  ValueError   Raised if flag_name not defined as a Python flag.
tf.compat.v1.flags.DEFINE Registers a generic Flag object.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE  
tf.compat.v1.flags.DEFINE(
    parser, name, default, help, flag_values=_flagvalues.FLAGS, serializer=None,
    module_name=None, **args
)
 
Note: in the docstrings of all DEFINE* functions, "registers" is short for "creates a new flag and registers it".
 Auxiliary function: clients should use the specialized DEFINE_ function instead.
 


 Args
  parser   ArgumentParser, used to parse the flag arguments.  
  name   str, the flag name.  
  default   The default value of the flag.  
  help   str, the help message.  
  flag_values   FlagValues, the FlagValues instance with which the flag will be registered. This should almost never need to be overridden.  
  serializer   ArgumentSerializer, the flag serializer instance.  
  module_name   str, the name of the Python module declaring this flag. If not provided, it will be computed using the stack trace of this call.  
  **args   dict, the extra keyword args that are passed to Flag init.   
 


 Returns   a handle to defined flag.
tf.compat.v1.flags.DEFINE_alias Defines an alias flag for an existing one.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_alias  
tf.compat.v1.flags.DEFINE_alias(
    name, original_name, flag_values=_flagvalues.FLAGS, module_name=None
)

 


 Args
  name   str, the flag name.  
  original_name   str, the original flag name.  
  flag_values   FlagValues, the FlagValues instance with which the flag will be registered. This should almost never need to be overridden.  
  module_name   A string, the name of the module that defines this flag.   
 


 Returns   a handle to defined flag.  

 


 Raises
  flags.FlagError   UnrecognizedFlagError: if the referenced flag doesn't exist. DuplicateFlagError: if the alias name has been used by some existing flag.
tf.compat.v1.flags.DEFINE_bool Registers a boolean flag.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_bool, tf.compat.v1.app.flags.DEFINE_boolean, tf.compat.v1.flags.DEFINE_boolean  
tf.compat.v1.flags.DEFINE_bool(
    name, default, help, flag_values=_flagvalues.FLAGS, module_name=None, **args
)
 Such a boolean flag does not take an argument. If a user wants to specify a false value explicitly, the long option beginning with 'no' must be used: i.e. --noflag This flag will have a value of None, True or False. None is possible if default=None and the user does not specify the flag on the command line.
 


 Args
  name   str, the flag name.  
  default   bool|str|None, the default value of the flag.  
  help   str, the help message.  
  flag_values   FlagValues, the FlagValues instance with which the flag will be registered. This should almost never need to be overridden.  
  module_name   str, the name of the Python module declaring this flag. If not provided, it will be computed using the stack trace of this call.  
  **args   dict, the extra keyword args that are passed to Flag init.   
 


 Returns   a handle to defined flag.
tf.compat.v1.flags.DEFINE_enum Registers a flag whose value can be any string from enum_values.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_enum  
tf.compat.v1.flags.DEFINE_enum(
    name, default, enum_values, help, flag_values=_flagvalues.FLAGS,
    module_name=None, **args
)
 Instead of a string enum, prefer DEFINE_enum_class, which allows defining enums from an enum.Enum class.
 


 Args
  name   str, the flag name.  
  default   str|None, the default value of the flag.  
  enum_values   [str], a non-empty list of strings with the possible values for the flag.  
  help   str, the help message.  
  flag_values   FlagValues, the FlagValues instance with which the flag will be registered. This should almost never need to be overridden.  
  module_name   str, the name of the Python module declaring this flag. If not provided, it will be computed using the stack trace of this call.  
  **args   dict, the extra keyword args that are passed to Flag init.   
 


 Returns   a handle to defined flag.
tf.compat.v1.flags.DEFINE_enum_class Registers a flag whose value can be the name of enum members.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_enum_class  
tf.compat.v1.flags.DEFINE_enum_class(
    name, default, enum_class, help, flag_values=_flagvalues.FLAGS,
    module_name=None, case_sensitive=False, **args
)

 


 Args
  name   str, the flag name.  
  default   Enum|str|None, the default value of the flag.  
  enum_class   class, the Enum class with all the possible values for the flag.  
  help   str, the help message.  
  flag_values   FlagValues, the FlagValues instance with which the flag will be registered. This should almost never need to be overridden.  
  module_name   str, the name of the Python module declaring this flag. If not provided, it will be computed using the stack trace of this call.  
  case_sensitive   bool, whether to map strings to members of the enum_class without considering case.  
  **args   dict, the extra keyword args that are passed to Flag init.   
 


 Returns   a handle to defined flag.
tf.compat.v1.flags.DEFINE_flag Registers a 'Flag' object with a 'FlagValues' object.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_flag  
tf.compat.v1.flags.DEFINE_flag(
    flag, flag_values=_flagvalues.FLAGS, module_name=None
)
 By default, the global FLAGS 'FlagValue' object is used. Typical users will use one of the more specialized DEFINE_xxx functions, such as DEFINE_string or DEFINE_integer. But developers who need to create Flag objects themselves should use this function to register their flags.
 


 Args
  flag   Flag, a flag that is key to the module.  
  flag_values   FlagValues, the FlagValues instance with which the flag will be registered. This should almost never need to be overridden.  
  module_name   str, the name of the Python module declaring this flag. If not provided, it will be computed using the stack trace of this call.   
 


 Returns   a handle to defined flag.
tf.compat.v1.flags.DEFINE_float Registers a flag whose value must be a float.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_float  
tf.compat.v1.flags.DEFINE_float(
    name, default, help, lower_bound=None, upper_bound=None,
    flag_values=_flagvalues.FLAGS, **args
)
 If lower_bound or upper_bound are set, then this flag must be within the given range.
 


 Args
  name   str, the flag name.  
  default   float|str|None, the default value of the flag.  
  help   str, the help message.  
  lower_bound   float, min value of the flag.  
  upper_bound   float, max value of the flag.  
  flag_values   FlagValues, the FlagValues instance with which the flag will be registered. This should almost never need to be overridden.  
  **args   dict, the extra keyword args that are passed to DEFINE.   
 


 Returns   a handle to defined flag.
tf.compat.v1.flags.DEFINE_integer Registers a flag whose value must be an integer.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_integer  
tf.compat.v1.flags.DEFINE_integer(
    name, default, help, lower_bound=None, upper_bound=None,
    flag_values=_flagvalues.FLAGS, **args
)
 If lower_bound, or upper_bound are set, then this flag must be within the given range.
 


 Args
  name   str, the flag name.  
  default   int|str|None, the default value of the flag.  
  help   str, the help message.  
  lower_bound   int, min value of the flag.  
  upper_bound   int, max value of the flag.  
  flag_values   FlagValues, the FlagValues instance with which the flag will be registered. This should almost never need to be overridden.  
  **args   dict, the extra keyword args that are passed to DEFINE.   
 


 Returns   a handle to defined flag.