tf.compat.v1.FixedLengthRecordReader A Reader that outputs fixed-length records from a file. Inherits From: ReaderBase
tf.compat.v1.FixedLengthRecordReader(
    record_bytes, header_bytes=None, footer_bytes=None, hop_bytes=None, name=None,
    encoding=None
)
 See ReaderBase for supported methods.

 Args
  record_bytes   An int.
  header_bytes   An optional int. Defaults to 0.
  footer_bytes   An optional int. Defaults to 0.
  hop_bytes   An optional int. Defaults to 0.
  name   A name for the operation (optional).
  encoding   The type of encoding for the file. Defaults to none.    Eager Compatibility Readers are not compatible with eager execution. Instead, please use tf.data to get data into your model.

 Attributes
  reader_ref   Op that implements the reader.
  supports_serialize   Whether the Reader implementation can serialize its state.    Methods num_records_produced View source
num_records_produced(
    name=None
)
 Returns the number of records this reader has produced. This is the same as the number of Read executions that have succeeded.

 Args
  name   A name for the operation (optional).

 Returns   An int64 Tensor.
 num_work_units_completed View source
num_work_units_completed(
    name=None
)
 Returns the number of work units this reader has finished processing.

 Args
  name   A name for the operation (optional).

 Returns   An int64 Tensor.
 read View source
read(
    queue, name=None
)
 Returns the next record (key, value) pair produced by a reader. Will dequeue a work unit from queue if necessary (e.g. when the Reader needs to start reading from a new file since it has finished with the previous file).

 Args
  queue   A Queue or a mutable string Tensor representing a handle to a Queue, with string work items.
  name   A name for the operation (optional).

 Returns   A tuple of Tensors (key, value).     key   A string scalar Tensor.
  value   A string scalar Tensor.    read_up_to View source
read_up_to(
    queue, num_records, name=None
)
 Returns up to num_records (key, value) pairs produced by a reader. Will dequeue a work unit from queue if necessary (e.g., when the Reader needs to start reading from a new file since it has finished with the previous file). It may return less than num_records even before the last batch.

 Args
  queue   A Queue or a mutable string Tensor representing a handle to a Queue, with string work items.
  num_records   Number of records to read.
  name   A name for the operation (optional).

 Returns   A tuple of Tensors (keys, values).     keys   A 1-D string Tensor.
  values   A 1-D string Tensor.    reset View source
reset(
    name=None
)
 Restore a reader to its initial clean state.

 Args
  name   A name for the operation (optional).

 Returns   The created Operation.
 restore_state View source
restore_state(
    state, name=None
)
 Restore a reader to a previously saved state. Not all Readers support being restored, so this can produce an Unimplemented error.

 Args
  state   A string Tensor. Result of a SerializeState of a Reader with matching type.
  name   A name for the operation (optional).

 Returns   The created Operation.
 serialize_state View source
serialize_state(
    name=None
)
 Produce a string tensor that encodes the state of a reader. Not all Readers support being serialized, so this can produce an Unimplemented error.

 Args
  name   A name for the operation (optional).

 Returns   A string Tensor.


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.


Module: tf.compat.v1.flags Import router for absl.flags. See https://github.com/abseil/abseil-py  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags  Modules tf_decorator module: Base TFDecorator class and utility functions for working with decorators. Classes class ArgumentParser: Base class used to parse and convert arguments. class ArgumentSerializer: Base class for generating string representations of a flag value. class BaseListParser: Base class for a parser of lists of strings. class BooleanFlag: Basic boolean flag. class BooleanParser: Parser of boolean values. class CantOpenFlagFileError: Raised when flagfile fails to open. class CsvListSerializer: Base class for generating string representations of a flag value. class DuplicateFlagError: Raised if there is a flag naming conflict. class EnumClassFlag: Basic enum flag; its value is an enum class's member. class EnumClassParser: Parser of an Enum class member. class EnumFlag: Basic enum flag; its value can be any string from list of enum_values. class EnumParser: Parser of a string enum value (a string value from a given set). class Error: The base class for all flags errors. class Flag: Information about a command-line flag. class FlagHolder: Holds a defined flag. class FlagNameConflictsWithMethodError: Raised when a flag name conflicts with FlagValues methods. class FlagValues: Registry of 'Flag' objects. class FloatParser: Parser of floating point values. class IllegalFlagValueError: Raised when the flag command line argument is illegal. class IntegerParser: Parser of an integer value. class ListParser: Parser for a comma-separated list of strings. class ListSerializer: Base class for generating string representations of a flag value. class MultiEnumClassFlag: A multi_enum_class flag. class MultiFlag: A flag that can appear multiple time on the command-line. class UnparsedFlagAccessError: Raised when accessing the flag value from unparsed FlagValues. class UnrecognizedFlagError: Raised when a flag is unrecognized. class ValidationError: Raised when flag validator constraint is not satisfied. class WhitespaceSeparatedListParser: Parser for a whitespace-separated list of strings. Functions DEFINE(...): Registers a generic Flag object. DEFINE_alias(...): Defines an alias flag for an existing one. DEFINE_bool(...): Registers a boolean flag. DEFINE_boolean(...): Registers a boolean flag. DEFINE_enum(...): Registers a flag whose value can be any string from enum_values. DEFINE_enum_class(...): Registers a flag whose value can be the name of enum members. DEFINE_flag(...): Registers a 'Flag' object with a 'FlagValues' object. DEFINE_float(...): Registers a flag whose value must be a float. DEFINE_integer(...): Registers a flag whose value must be an integer. DEFINE_list(...): Registers a flag whose value is a comma-separated list of strings. DEFINE_multi(...): Registers a generic MultiFlag that parses its args with a given parser. DEFINE_multi_enum(...): Registers a flag whose value can be a list strings from enum_values. DEFINE_multi_enum_class(...): Registers a flag whose value can be a list of enum members. DEFINE_multi_float(...): Registers a flag whose value can be a list of arbitrary floats. DEFINE_multi_integer(...): Registers a flag whose value can be a list of arbitrary integers. DEFINE_multi_string(...): Registers a flag whose value can be a list of any strings. DEFINE_spaceseplist(...): Registers a flag whose value is a whitespace-separated list of strings. DEFINE_string(...): Registers a flag whose value can be any string. FLAGS(...): Registry of 'Flag' objects. adopt_module_key_flags(...): Declares that all flags key to a module are key to the current module. declare_key_flag(...): Declares one flag as key to the current module. disclaim_key_flags(...): Declares that the current module will not define any more key flags. doc_to_help(...): Takes a doc string and reformats it as help. flag_dict_to_args(...): Convert a dict of values into process call parameters. get_help_width(...): Returns the integer width of help lines that is used in TextWrap. mark_bool_flags_as_mutual_exclusive(...): Ensures that only one flag among flag_names is True. mark_flag_as_required(...): Ensures that flag is not None during program execution. mark_flags_as_mutual_exclusive(...): Ensures that only one flag among flag_names is not None. mark_flags_as_required(...): Ensures that flags are not None during program execution. multi_flags_validator(...): A function decorator for defining a multi-flag validator. register_multi_flags_validator(...): Adds a constraint to multiple flags. register_validator(...): Adds a constraint, which will be enforced during program execution. text_wrap(...): Wraps a given text to a maximum line length and returns it. validator(...): A function decorator for defining a flag validator.


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.


tf.compat.v1.flags.DEFINE_list Registers a flag whose value is a comma-separated list of strings.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_list
tf.compat.v1.flags.DEFINE_list(
    name, default, help, flag_values=_flagvalues.FLAGS, **args
)
 The flag value is parsed with a CSV parser.

 Args
  name   str, the flag name.
  default   list|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.
  **args   Dictionary with extra keyword args that are passed to the Flag init.

 Returns   a handle to defined flag.


tf.compat.v1.flags.DEFINE_multi Registers a generic MultiFlag that parses its args with a given parser.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_multi
tf.compat.v1.flags.DEFINE_multi(
    parser, serializer, name, default, help, flag_values=_flagvalues.FLAGS,
    module_name=None, **args
)
 Auxiliary function. Normal users should NOT use it directly. Developers who need to create their own 'Parser' classes for options which can appear multiple times can call this module function to register their flags.

 Args
  parser   ArgumentParser, used to parse the flag arguments.
  serializer   ArgumentSerializer, the flag serializer instance.
  name   str, the flag name.
  default   Union[Iterable[T], Text, None], the default value of the flag. If the value is text, it will be parsed as if it was provided from the command line. If the value is a non-string iterable, it will be iterated over to create a shallow copy of the values. If it is None, it is left as-is.
  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   A string, the name of the Python module declaring this flag. If not provided, it will be computed using the stack trace of this call.
  **args   Dictionary with extra keyword args that are passed to the Flag init.

 Returns   a handle to defined flag.


tf.compat.v1.flags.DEFINE_multi_enum Registers a flag whose value can be a list strings from enum_values.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_multi_enum
tf.compat.v1.flags.DEFINE_multi_enum(
    name, default, enum_values, help, flag_values=_flagvalues.FLAGS,
    case_sensitive=True, **args
)
 Use the flag on the command line multiple times to place multiple enum values into the list. The 'default' may be a single string (which will be converted into a single-element list) or a list of strings.

 Args
  name   str, the flag name.
  default   Union[Iterable[Text], Text, None], the default value of the flag; see DEFINE_multi.
  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.
  case_sensitive   Whether or not the enum is to be case-sensitive.
  **args   Dictionary with extra keyword args that are passed to the Flag init.

 Returns   a handle to defined flag.


tf.compat.v1.flags.DEFINE_multi_enum_class Registers a flag whose value can be a list of enum members.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_multi_enum_class
tf.compat.v1.flags.DEFINE_multi_enum_class(
    name, default, enum_class, help, flag_values=_flagvalues.FLAGS,
    module_name=None, case_sensitive=False, **args
)
 Use the flag on the command line multiple times to place multiple enum values into the list.

 Args
  name   str, the flag name.
  default   Union[Iterable[Enum], Iterable[Text], Enum, Text, None], the default value of the flag; see DEFINE_multi; only differences are documented here. If the value is a single Enum, it is treated as a single-item list of that Enum value. If it is an iterable, text values within the iterable will be converted to the equivalent Enum objects.
  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   A string, 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   Dictionary with extra keyword args that are passed to the Flag init.

 Returns   a handle to defined flag.


tf.compat.v1.flags.DEFINE_multi_float Registers a flag whose value can be a list of arbitrary floats.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_multi_float
tf.compat.v1.flags.DEFINE_multi_float(
    name, default, help, lower_bound=None, upper_bound=None,
    flag_values=_flagvalues.FLAGS, **args
)
 Use the flag on the command line multiple times to place multiple float values into the list. The 'default' may be a single float (which will be converted into a single-element list) or a list of floats.

 Args
  name   str, the flag name.
  default   Union[Iterable[float], Text, None], the default value of the flag; see DEFINE_multi.
  help   str, the help message.
  lower_bound   float, min values of the flag.
  upper_bound   float, max values 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   Dictionary with extra keyword args that are passed to the Flag init.

 Returns   a handle to defined flag.


tf.compat.v1.flags.DEFINE_multi_integer Registers a flag whose value can be a list of arbitrary integers.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_multi_integer
tf.compat.v1.flags.DEFINE_multi_integer(
    name, default, help, lower_bound=None, upper_bound=None,
    flag_values=_flagvalues.FLAGS, **args
)
 Use the flag on the command line multiple times to place multiple integer values into the list. The 'default' may be a single integer (which will be converted into a single-element list) or a list of integers.

 Args
  name   str, the flag name.
  default   Union[Iterable[int], Text, None], the default value of the flag; see DEFINE_multi.
  help   str, the help message.
  lower_bound   int, min values of the flag.
  upper_bound   int, max values 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   Dictionary with extra keyword args that are passed to the Flag init.

 Returns   a handle to defined flag.


tf.compat.v1.flags.DEFINE_multi_string Registers a flag whose value can be a list of any strings.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_multi_string
tf.compat.v1.flags.DEFINE_multi_string(
    name, default, help, flag_values=_flagvalues.FLAGS, **args
)
 Use the flag on the command line multiple times to place multiple string values into the list. The 'default' may be a single string (which will be converted into a single-element list) or a list of strings.

 Args
  name   str, the flag name.
  default   Union[Iterable[Text], Text, None], the default value of the flag; see DEFINE_multi.
  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.
  **args   Dictionary with extra keyword args that are passed to the Flag init.

 Returns   a handle to defined flag.


tf.compat.v1.flags.DEFINE_spaceseplist Registers a flag whose value is a whitespace-separated list of strings.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_spaceseplist
tf.compat.v1.flags.DEFINE_spaceseplist(
    name, default, help, comma_compat=False, flag_values=_flagvalues.FLAGS, **args
)
 Any whitespace can be used as a separator.

 Args
  name   str, the flag name.
  default   list|str|None, the default value of the flag.
  help   str, the help message.
  comma_compat   bool - Whether to support comma as an additional separator. If false then only whitespace is supported. This is intended only for backwards compatibility with flags that used to be comma-separated.
  flag_values   FlagValues, the FlagValues instance with which the flag will be registered. This should almost never need to be overridden.
  **args   Dictionary with extra keyword args that are passed to the Flag init.

 Returns   a handle to defined flag.


tf.compat.v1.flags.DEFINE_string Registers a flag whose value can be any string.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.DEFINE_string
tf.compat.v1.flags.DEFINE_string(
    name, default, help, flag_values=_flagvalues.FLAGS, **args
)


tf.compat.v1.flags.disclaim_key_flags Declares that the current module will not define any more key flags.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.disclaim_key_flags
tf.compat.v1.flags.disclaim_key_flags()
 Normally, the module that calls the DEFINE_xxx functions claims the flag to be its key flag. This is undesirable for modules that define additional DEFINE_yyy functions with its own flag parsers and serializers, since that module will accidentally claim flags defined by DEFINE_yyy as its key flags. After calling this function, the module disclaims flag definitions thereafter, so the key flags will be correctly attributed to the caller of DEFINE_yyy. After calling this function, the module will not be able to define any more flags. This function will affect all FlagValues objects.


tf.compat.v1.flags.doc_to_help Takes a doc string and reformats it as help.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.doc_to_help
tf.compat.v1.flags.doc_to_help(
    doc
)


tf.compat.v1.flags.DuplicateFlagError Raised if there is a flag naming conflict. Inherits From: Error  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.DuplicateFlagError  Methods from_flag
@classmethod
from_flag(
    flagname, flag_values, other_flag_values=None
)
 Creates a DuplicateFlagError by providing flag name and values.

 Args
  flagname   str, the name of the flag being redefined.
  flag_values   FlagValues, the FlagValues instance containing the first definition of flagname.
  other_flag_values   FlagValues, if it is not None, it should be the FlagValues object where the second definition of flagname occurs. If it is None, we assume that we're being called when attempting to create the flag a second time, and we use the module calling this one as the source of the second definition.

 Returns   An instance of DuplicateFlagError.


tf.compat.v1.flags.EnumClassFlag Basic enum flag; its value is an enum class's member. Inherits From: Flag  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.EnumClassFlag
tf.compat.v1.flags.EnumClassFlag(
    name, default, help, enum_class, short_name=None, case_sensitive=False, **args
)

 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.EnumClassParser Parser of an Enum class member. Inherits From: ArgumentParser  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.EnumClassParser
tf.compat.v1.flags.EnumClassParser(
    enum_class, case_sensitive=True
)

 Args
  enum_class   class, the Enum class with all possible flag values.
  case_sensitive   bool, whether or not the enum is to be case-sensitive. If False, all member names must be unique when case is ignored.

 Raises
  TypeError   When enum_class is not a subclass of Enum.
  ValueError   When enum_class is empty.

 Attributes
  member_names   The accepted enum names, in lowercase if not case sensitive.    Methods flag_type
flag_type()
 See base class. parse
parse(
    argument
)
 Determines validity of argument and returns the correct element of enum.

 Args
  argument   str or Enum class member, the supplied flag value.

 Returns   The first matching Enum class member in Enum class.

 Raises
  ValueError   Raised when argument didn't match anything in enum.

 Class Variables
  syntactic_help   ''


tf.compat.v1.flags.EnumFlag Basic enum flag; its value can be any string from list of enum_values. Inherits From: Flag  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.EnumFlag
tf.compat.v1.flags.EnumFlag(
    name, default, help, enum_values, short_name=None, case_sensitive=True, **args
)

 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.EnumParser Parser of a string enum value (a string value from a given set). Inherits From: ArgumentParser  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.EnumParser
tf.compat.v1.flags.EnumParser(
    enum_values, case_sensitive=True
)

 Args
  enum_values   [str], a non-empty list of string values in the enum.
  case_sensitive   bool, whether or not the enum is to be case-sensitive.

 Raises
  ValueError   When enum_values is empty.    Methods flag_type
flag_type()
 See base class. parse
parse(
    argument
)
 Determines validity of argument and returns the correct element of enum.

 Args
  argument   str, the supplied flag value.

 Returns   The first matching element from enum_values.

 Raises
  ValueError   Raised when argument didn't match anything in enum.

 Class Variables
  syntactic_help   ''


tf.compat.v1.flags.Error The base class for all flags errors.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.Error


tf.compat.v1.flags.Flag Information about a command-line flag.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.Flag
tf.compat.v1.flags.Flag(
    parser, serializer, name, default, help_string, short_name=None, boolean=False,
    allow_override=False, allow_override_cpp=False, allow_hide_cpp=False,
    allow_overwrite=True, allow_using_method_names=False
)
 'Flag' objects define the following fields: .name - the name for this flag; .default - the default value for this flag; .default_unparsed - the unparsed default value for this flag. .default_as_str - default value as repr'd string, e.g., "'true'" (or None); .value - the most recent parsed value of this flag; set by parse(); .help - a help string or None if no help is available; .short_name - the single letter alias for this flag (or None); .boolean - if 'true', this flag does not accept arguments; .present - true if this flag was parsed from command line flags; .parser - an ArgumentParser object; .serializer - an ArgumentSerializer object; .allow_override - the flag may be redefined without raising an error, and newly defined flag overrides the old one. .allow_override_cpp - use the flag from C++ if available; the flag definition is replaced by the C++ flag after init; .allow_hide_cpp - use the Python flag despite having a C++ flag with the same name (ignore the C++ flag); .using_default_value - the flag value has not been set by user; .allow_overwrite - the flag may be parsed more than once without raising an error, the last set value will be used; .allow_using_method_names - whether this flag can be defined even if it has a name that conflicts with a FlagValues method. The only public method of a 'Flag' object is parse(), but it is typically only called by a 'FlagValues' object. The parse() method is a thin wrapper around the 'ArgumentParser' parse() method. The parsed value is saved in .value, and the .present attribute is updated. If this flag was already present, an Error is raised. parse() is also called during init to parse the default value and initialize the .value attribute. This enables other python modules to safely use flags even if the main module neglects to parse the command line arguments. The .present attribute is cleared after init parsing. If the default value is set to None, then the init parsing step is skipped and the .value attribute is initialized to None.
Note: The default value is also presented to the user in the help string, so it is important that it be a legal value for this flag.

 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.FlagHolder Holds a defined flag.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.FlagHolder
tf.compat.v1.flags.FlagHolder(
    flag_values, flag, ensure_non_none_value=False
)
 This facilitates a cleaner api around global state. Instead of flags.DEFINE_integer('foo', ...)
flags.DEFINE_integer('bar', ...)
...
def method():
  # prints parsed value of 'bar' flag
  print(flags.FLAGS.foo)
  # runtime error due to typo or possibly bad coding style.
  print(flags.FLAGS.baz)
 it encourages code like FOO_FLAG = flags.DEFINE_integer('foo', ...)
BAR_FLAG = flags.DEFINE_integer('bar', ...)
...
def method():
  print(FOO_FLAG.value)
  print(BAR_FLAG.value)
 since the name of the flag appears only once in the source code.

 Args
  flag_values   The container the flag is registered to.
  flag   The flag object for this flag.
  ensure_non_none_value   Is the value of the flag allowed to be None.

 Attributes
  default   Returns the default value of the flag.
  name

  value   Returns the value of the flag. If _ensure_non_none_value is True, then return value is not None.
   Methods __bool__
__bool__()
 __eq__
__eq__(
    other
)
 Return self==value. __nonzero__
__nonzero__()


tf.compat.v1.flags.FlagNameConflictsWithMethodError Raised when a flag name conflicts with FlagValues methods. Inherits From: Error  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.FlagNameConflictsWithMethodError


tf.compat.v1.flags.FLAGS Registry of 'Flag' objects.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.FLAGS
tf.compat.v1.flags.FLAGS(
    *args, **kwargs
)
 A 'FlagValues' can then scan command line arguments, passing flag arguments through to the 'Flag' objects that it owns. It also provides easy access to the flag values. Typically only one 'FlagValues' object is needed by an application: flags.FLAGS This class is heavily overloaded: 'Flag' objects are registered via setitem: FLAGS['longname'] = x # register a new flag The .value attribute of the registered 'Flag' objects can be accessed as attributes of this 'FlagValues' object, through getattr. Both the long and short name of the original 'Flag' objects can be used to access its value: FLAGS.longname # parsed flag value FLAGS.x # parsed flag value (short name) Command line arguments are scanned and passed to the registered 'Flag' objects through the call method. Unparsed arguments, including argv0 are returned. argv = FLAGS(sys.argv) # scan command line arguments The original registered Flag objects can be retrieved through the use of the dictionary-like operator, getitem: x = FLAGS['longname'] # access the registered Flag object The str() operator of a 'FlagValues' object provides help for all of the registered 'Flag' objects.


tf.compat.v1.flags.FlagValues Registry of 'Flag' objects.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.FlagValues
tf.compat.v1.flags.FlagValues()
 A 'FlagValues' can then scan command line arguments, passing flag arguments through to the 'Flag' objects that it owns. It also provides easy access to the flag values. Typically only one 'FlagValues' object is needed by an application: flags.FLAGS This class is heavily overloaded: 'Flag' objects are registered via setitem: FLAGS['longname'] = x # register a new flag The .value attribute of the registered 'Flag' objects can be accessed as attributes of this 'FlagValues' object, through getattr. Both the long and short name of the original 'Flag' objects can be used to access its value: FLAGS.longname # parsed flag value FLAGS.x # parsed flag value (short name) Command line arguments are scanned and passed to the registered 'Flag' objects through the call method. Unparsed arguments, including argv0 are returned. argv = FLAGS(sys.argv) # scan command line arguments The original registered Flag objects can be retrieved through the use of the dictionary-like operator, getitem: x = FLAGS['longname'] # access the registered Flag object The str() operator of a 'FlagValues' object provides help for all of the registered 'Flag' objects. Methods append_flag_values
append_flag_values(
    flag_values
)
 Appends flags registered in another FlagValues instance.

 Args
  flag_values   FlagValues, the FlagValues instance from which to copy flags.    append_flags_into_file
append_flags_into_file(
    filename
)
 Appends all flags assignments from this FlagInfo object to a file. Output will be in the format of a flagfile.
Note: MUST mirror the behavior of the C++ AppendFlagsIntoFile from https://github.com/gflags/gflags

 Args
  filename   str, name of the file.    find_module_defining_flag
find_module_defining_flag(
    flagname, default=None
)
 Return the name of the module defining this flag, or default.

 Args
  flagname   str, name of the flag to lookup.
  default   Value to return if flagname is not defined. Defaults to None.

 Returns   The name of the module which registered the flag with this name. If no such module exists (i.e. no flag with this name exists), we return default.
 find_module_id_defining_flag
find_module_id_defining_flag(
    flagname, default=None
)
 Return the ID of the module defining this flag, or default.

 Args
  flagname   str, name of the flag to lookup.
  default   Value to return if flagname is not defined. Defaults to None.

 Returns   The ID of the module which registered the flag with this name. If no such module exists (i.e. no flag with this name exists), we return default.
 flag_values_dict
flag_values_dict()
 Returns a dictionary that maps flag names to flag values. flags_by_module_dict
flags_by_module_dict()
 Returns the dictionary of module_name -> list of defined flags.

 Returns   A dictionary. Its keys are module names (strings). Its values are lists of Flag objects.
 flags_by_module_id_dict
flags_by_module_id_dict()
 Returns the dictionary of module_id -> list of defined flags.

 Returns   A dictionary. Its keys are module IDs (ints). Its values are lists of Flag objects.
 flags_into_string
flags_into_string()
 Returns a string with the flags assignments from this FlagValues object. This function ignores flags whose value is None. Each flag assignment is separated by a newline.
Note: MUST mirror the behavior of the C++ CommandlineFlagsIntoString from https://github.com/gflags/gflags

 Returns   str, the string with the flags assignments from this FlagValues object. The flags are ordered by (module_name, flag_name).
 get_flag_value
get_flag_value(
    name, default
)
 Returns the value of a flag (if not None) or a default value.

 Args
  name   str, the name of a flag.
  default   Default value to use if the flag value is None.

 Returns   Requested flag value or default.
 get_flags_for_module
get_flags_for_module(
    module
)
 Returns the list of flags defined by a module.

 Args
  module   module|str, the module to get flags from.

 Returns   [Flag], a new list of Flag instances. Caller may update this list as     desired   none of those changes will affect the internals of this FlagValue instance.    get_help
get_help(
    prefix='', include_special_flags=True
)
 Returns a help string for all known flags.

 Args
  prefix   str, per-line output prefix.
  include_special_flags   bool, whether to include description of SPECIAL_FLAGS, i.e. --flagfile and --undefok.

 Returns   str, formatted help message.
 get_key_flags_for_module
get_key_flags_for_module(
    module
)
 Returns the list of key flags for a module.

 Args
  module   module|str, the module to get key flags from.

 Returns   [Flag], a new list of Flag instances. Caller may update this list as     desired   none of those changes will affect the internals of this FlagValue instance.    is_gnu_getopt
is_gnu_getopt()
 is_parsed
is_parsed()
 Returns whether flags were parsed. key_flags_by_module_dict
key_flags_by_module_dict()
 Returns the dictionary of module_name -> list of key flags.

 Returns   A dictionary. Its keys are module names (strings). Its values are lists of Flag objects.
 main_module_help
main_module_help()
 Describes the key flags of the main module.

 Returns   str, describing the key flags of the main module.
 mark_as_parsed
mark_as_parsed()
 Explicitly marks flags as parsed. Use this when the caller knows that this FlagValues has been parsed as if a call() invocation has happened. This is only a public method for use by things like appcommands which do additional command like parsing. module_help
module_help(
    module
)
 Describes the key flags of a module.

 Args
  module   module|str, the module to describe the key flags for.

 Returns   str, describing the key flags of a module.
 read_flags_from_files
read_flags_from_files(
    argv, force_gnu=True
)
 Processes command line args, but also allow args to be read from file.

 Args
  argv   [str], a list of strings, usually sys.argv[1:], which may contain one or more flagfile directives of the form --flagfile="./filename". Note that the name of the program (sys.argv[0]) should be omitted.
  force_gnu   bool, if False, --flagfile parsing obeys the FLAGS.is_gnu_getopt() value. If True, ignore the value and always follow gnu_getopt semantics.

 Returns   A new list which has the original list combined with what we read from any flagfile(s).

 Raises
  IllegalFlagValueError   Raised when --flagfile is provided with no argument.    This function is called by FLAGS(argv). It scans the input list for a flag that looks like: --flagfile=. Then it opens , reads all valid key and value pairs and inserts them into the input list in exactly the place where the --flagfile arg is found. Note that your application's flags are still defined the usual way using absl.flags DEFINE_flag() type functions. Notes (assuming we're getting a commandline of some sort as our input): --> For duplicate flags, the last one we hit should "win". --> Since flags that appear later win, a flagfile's settings can be "weak" if the --flagfile comes at the beginning of the argument sequence, and it can be "strong" if the --flagfile comes at the end. --> A further "--flagfile=" CAN be nested in a flagfile. It will be expanded in exactly the spot where it is found. --> In a flagfile, a line beginning with # or // is a comment. --> Entirely blank lines should be ignored. register_flag_by_module
register_flag_by_module(
    module_name, flag
)
 Records the module that defines a specific flag. We keep track of which flag is defined by which module so that we can later sort the flags by module.

 Args
  module_name   str, the name of a Python module.
  flag   Flag, the Flag instance that is key to the module.    register_flag_by_module_id
register_flag_by_module_id(
    module_id, flag
)
 Records the module that defines a specific flag.

 Args
  module_id   int, the ID of the Python module.
  flag   Flag, the Flag instance that is key to the module.    register_key_flag_for_module
register_key_flag_for_module(
    module_name, flag
)
 Specifies that a flag is a key flag for a module.

 Args
  module_name   str, the name of a Python module.
  flag   Flag, the Flag instance that is key to the module.    remove_flag_values
remove_flag_values(
    flag_values
)
 Remove flags that were previously appended from another FlagValues.

 Args
  flag_values   FlagValues, the FlagValues instance containing flags to remove.    set_default
set_default(
    name, value
)
 Changes the default value of the named flag object. The flag's current value is also updated if the flag is currently using the default value, i.e. not specified in the command line, and not set by FLAGS.name = value.

 Args
  name   str, the name of the flag to modify.
  value   The new default value.

 Raises
  UnrecognizedFlagError   Raised when there is no registered flag named name.
  IllegalFlagValueError   Raised when value is not valid.    set_gnu_getopt
set_gnu_getopt(
    gnu_getopt=True
)
 Sets whether or not to use GNU style scanning. GNU style allows mixing of flag and non-flag arguments. See http://docs.python.org/library/getopt.html#getopt.gnu_getopt

 Args
  gnu_getopt   bool, whether or not to use GNU style scanning.    unparse_flags
unparse_flags()
 Unparses all flags to the point before any FLAGS(argv) was called. validate_all_flags
validate_all_flags()
 Verifies whether all flags pass validation.

 Raises
  AttributeError   Raised if validators work with a non-existing flag.
  IllegalFlagValueError   Raised if validation fails for at least one validator.    write_help_in_xml_format
write_help_in_xml_format(
    outfile=None
)
 Outputs flag documentation in XML format.
Note: We use element names that are consistent with those used by the C++ command-line flag library, from https://github.com/gflags/gflags We also use a few new elements (e.g., ), but we do not interfere / overlap with existing XML elements used by the C++ library. Please maintain this consistency.

 Args
  outfile   File object we write to. Default None means sys.stdout.    __call__
__call__(
    argv, known_only=False
)
 Parses flags from argv; stores parsed flags into this FlagValues object. All unparsed arguments are returned.

 Args
  argv   a tuple/list of strings.
  known_only   bool, if True, parse and remove known flags; return the rest untouched. Unknown flags specified by --undefok are not returned.

 Returns   The list of arguments not parsed as options, including argv[0].

 Raises
  Error   Raised on any parsing error.
  TypeError   Raised on passing wrong type of arguments.
  ValueError   Raised on flag value parsing error.    __contains__
__contains__(
    name
)
 Returns True if name is a value (flag) in the dict. __getitem__
__getitem__(
    name
)
 Returns the Flag object for the flag --name. __iter__
__iter__()
 __len__
__len__()


tf.compat.v1.flags.flag_dict_to_args Convert a dict of values into process call parameters.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.flag_dict_to_args
tf.compat.v1.flags.flag_dict_to_args(
    flag_map, multi_flags=None
)
 This method is used to convert a dictionary into a sequence of parameters for a binary that parses arguments using this module.

 Args
  flag_map   dict, a mapping where the keys are flag names (strings). values are treated according to their type:  If value is None, then only the name is emitted. If value is True, then only the name is emitted. If value is False, then only the name prepended with 'no' is emitted. If value is a string then --name=value is emitted. If value is a collection, this will emit --name=value1,value2,value3, unless the flag name is in multi_flags, in which case this will emit --name=value1 --name=value2 --name=value3. Everything else is converted to string an passed as such.

  multi_flags   set, names (strings) of flags that should be treated as multi-flags.

 Yields   sequence of string suitable for a subprocess execution.


tf.compat.v1.flags.FloatParser Parser of floating point values. Inherits From: ArgumentParser  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.FloatParser
tf.compat.v1.flags.FloatParser(
    lower_bound=None, upper_bound=None
)
 Parsed value may be bounded to a given upper and lower bound. Methods convert
convert(
    argument
)
 Returns the float value of argument. flag_type
flag_type()
 See base class. is_outside_bounds
is_outside_bounds(
    val
)
 Returns whether the value is outside the bounds or not. parse
parse(
    argument
)
 See base class.

 Class Variables
  number_article   'a'
  number_name   'number'
  syntactic_help   'a number'


tf.compat.v1.flags.get_help_width Returns the integer width of help lines that is used in TextWrap.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.get_help_width
tf.compat.v1.flags.get_help_width()


tf.compat.v1.flags.IllegalFlagValueError Raised when the flag command line argument is illegal. Inherits From: Error  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.IllegalFlagValueError


tf.compat.v1.flags.IntegerParser Parser of an integer value. Inherits From: ArgumentParser  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.IntegerParser
tf.compat.v1.flags.IntegerParser(
    lower_bound=None, upper_bound=None
)
 Parsed value may be bounded to a given upper and lower bound. Methods convert
convert(
    argument
)
 Returns the int value of argument. flag_type
flag_type()
 See base class. is_outside_bounds
is_outside_bounds(
    val
)
 Returns whether the value is outside the bounds or not. parse
parse(
    argument
)
 See base class.

 Class Variables
  number_article   'an'
  number_name   'integer'
  syntactic_help   'an integer'


tf.compat.v1.flags.ListParser Parser for a comma-separated list of strings. Inherits From: BaseListParser, ArgumentParser  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.ListParser
tf.compat.v1.flags.ListParser()
 Methods flag_type
flag_type()
 See base class. parse
parse(
    argument
)
 Parses argument as comma-separated list of strings.

 Class Variables
  syntactic_help   ''


tf.compat.v1.flags.ListSerializer 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.ListSerializer
tf.compat.v1.flags.ListSerializer(
    list_sep
)
 Methods serialize
serialize(
    value
)
 See base class.


tf.compat.v1.flags.mark_bool_flags_as_mutual_exclusive Ensures that only one flag among flag_names is True.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.mark_bool_flags_as_mutual_exclusive
tf.compat.v1.flags.mark_bool_flags_as_mutual_exclusive(
    flag_names, required=False, flag_values=_flagvalues.FLAGS
)

 Args
  flag_names   [str], names of the flags.
  required   bool. If true, exactly one flag must be True. Otherwise, at most one flag can be True, and it is valid for all flags to be False.
  flag_values   flags.FlagValues, optional FlagValues instance where the flags are defined.


tf.compat.v1.flags.mark_flags_as_mutual_exclusive Ensures that only one flag among flag_names is not None.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.mark_flags_as_mutual_exclusive
tf.compat.v1.flags.mark_flags_as_mutual_exclusive(
    flag_names, required=False, flag_values=_flagvalues.FLAGS
)
 Important note: This validator checks if flag values are None, and it does not distinguish between default and explicit values. Therefore, this validator does not make sense when applied to flags with default values other than None, including other false values (e.g. False, 0, '', []). That includes multi flags with a default value of [] instead of None.

 Args
  flag_names   [str], names of the flags.
  required   bool. If true, exactly one of the flags must have a value other than None. Otherwise, at most one of the flags can have a value other than None, and it is valid for all of the flags to be None.
  flag_values   flags.FlagValues, optional FlagValues instance where the flags are defined.


tf.compat.v1.flags.mark_flags_as_required Ensures that flags are not None during program execution.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.mark_flags_as_required
tf.compat.v1.flags.mark_flags_as_required(
    flag_names, flag_values=_flagvalues.FLAGS
)
 If your module might be imported by others, and you only wish to make the flag required when the module is directly executed, call this method like this: if name == 'main': flags.mark_flags_as_required(['flag1', 'flag2', 'flag3']) app.run()

 Args
  flag_names   Sequence[str], names of the flags.
  flag_values   flags.FlagValues, optional FlagValues instance where the flags are defined.

 Raises
  AttributeError   If any of flag name has not already been defined as a flag.


tf.compat.v1.flags.mark_flag_as_required Ensures that flag is not None during program execution.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.mark_flag_as_required
tf.compat.v1.flags.mark_flag_as_required(
    flag_name, flag_values=_flagvalues.FLAGS
)
 Registers a flag validator, which will follow usual validator rules. Important note: validator will pass for any non-None value, such as False, 0 (zero), '' (empty string) and so on. If your module might be imported by others, and you only wish to make the flag required when the module is directly executed, call this method like this: if name == 'main': flags.mark_flag_as_required('your_flag_name') app.run()

 Args
  flag_name   str, name of the flag
  flag_values   flags.FlagValues, optional FlagValues instance where the flag is defined.

 Raises
  AttributeError   Raised when flag_name is not registered as a valid flag name.


tf.compat.v1.flags.MultiEnumClassFlag A multi_enum_class flag. Inherits From: MultiFlag, Flag  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.MultiEnumClassFlag
tf.compat.v1.flags.MultiEnumClassFlag(
    name, default, help_string, enum_class, case_sensitive=False, **args
)
 See the doc for MultiFlag for most behaviors of this class. In addition, this class knows how to handle enum.Enum instances as values for this flag type.

 Attributes
  value
   Methods flag_type
flag_type()
 See base class. parse
parse(
    arguments
)
 Parses one or more arguments with the installed parser.

 Args
  arguments   a single argument or a list of arguments (typically a list of default values); a single argument is converted internally into a list containing one item.    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.MultiFlag A flag that can appear multiple time on the command-line. Inherits From: Flag  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.MultiFlag
tf.compat.v1.flags.MultiFlag(
    *args, **kwargs
)
 The value of such a flag is a list that contains the individual values from all the appearances of that flag on the command-line. See the doc for Flag for most behavior of this class. Only differences in behavior are described here:  The default value may be either a single value or an iterable of values. A single value is transformed into a single-item list of that value. The value of the flag is always a list, even if the option was only supplied once, and even if the default value is a single value

 Attributes
  value
   Methods flag_type
flag_type()
 See base class. parse
parse(
    arguments
)
 Parses one or more arguments with the installed parser.

 Args
  arguments   a single argument or a list of arguments (typically a list of default values); a single argument is converted internally into a list containing one item.    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.multi_flags_validator A function decorator for defining a multi-flag validator.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.multi_flags_validator
tf.compat.v1.flags.multi_flags_validator(
    flag_names, message='Flag validation failed',
    flag_values=_flagvalues.FLAGS
)
 Registers the decorated function as a validator for flag_names, e.g. @flags.multi_flags_validator(['foo', 'bar']) def _CheckFooBar(flags_dict): ... See register_multi_flags_validator() for the specification of checker function.

 Args
  flag_names   [str], a list of the flag names to be checked.
  message   str, error text to be shown to the user if checker returns False. If checker raises flags.ValidationError, message from the raised error will be shown.
  flag_values   flags.FlagValues, optional FlagValues instance to validate against.

 Returns   A function decorator that registers its function argument as a validator.

 Raises
  AttributeError   Raised when a flag is not registered as a valid flag name.


tf.compat.v1.flags.register_multi_flags_validator Adds a constraint to multiple flags.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.register_multi_flags_validator
tf.compat.v1.flags.register_multi_flags_validator(
    flag_names, multi_flags_checker, message='Flags validation failed',
    flag_values=_flagvalues.FLAGS
)
 The constraint is validated when flags are initially parsed, and after each change of the corresponding flag's value.

 Args
  flag_names   [str], a list of the flag names to be checked.
  multi_flags_checker   callable, a function to validate the flag. input - dict, with keys() being flag_names, and value for each key being the value of the corresponding flag (string, boolean, etc). output - bool, True if validator constraint is satisfied. If constraint is not satisfied, it should either return False or raise flags.ValidationError.
  message   str, error text to be shown to the user if checker returns False. If checker raises flags.ValidationError, message from the raised error will be shown.
  flag_values   flags.FlagValues, optional FlagValues instance to validate against.

 Raises
  AttributeError   Raised when a flag is not registered as a valid flag name.


tf.compat.v1.flags.register_validator Adds a constraint, which will be enforced during program execution.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.register_validator
tf.compat.v1.flags.register_validator(
    flag_name, checker, message='Flag validation failed',
    flag_values=_flagvalues.FLAGS
)
 The constraint is validated when flags are initially parsed, and after each change of the corresponding flag's value. Args: flag_name: str, name of the flag to be checked. checker: callable, a function to validate the flag. input - A single positional argument: The value of the corresponding flag (string, boolean, etc. This value will be passed to checker by the library). output - bool, True if validator constraint is satisfied. If constraint is not satisfied, it should either return False or raise flags.ValidationError(desired_error_message). message: str, error text to be shown to the user if checker returns False. If checker raises flags.ValidationError, message from the raised error will be shown. flag_values: flags.FlagValues, optional FlagValues instance to validate against. Raises: AttributeError: Raised when flag_name is not registered as a valid flag name.


tf.compat.v1.flags.text_wrap Wraps a given text to a maximum line length and returns it.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.text_wrap
tf.compat.v1.flags.text_wrap(
    text, length=None, indent='', firstline_indent=None
)
 It turns lines that only contain whitespace into empty lines, keeps new lines, and expands tabs using 4 spaces.

 Args
  text   str, text to wrap.
  length   int, maximum length of a line, includes indentation. If this is None then use get_help_width()
  indent   str, indent for all but first line.
  firstline_indent   str, indent for first line; if None, fall back to indent.

 Returns   str, the wrapped text.

 Raises
  ValueError   Raised if indent or firstline_indent not shorter than length.


Module: tf.compat.v1.flags.tf_decorator Base TFDecorator class and utility functions for working with decorators.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator  There are two ways to create decorators that TensorFlow can introspect into. This is important for documentation generation purposes, so that function signatures aren't obscured by the (*args, **kwds) signature that decorators often provide.  Call tf_decorator.make_decorator on your wrapper function. If your decorator is stateless, or can capture all of the variables it needs to work with through lexical closure, this is the simplest option. Create your wrapper function as usual, but instead of returning it, return tf_decorator.make_decorator(target, your_wrapper). This will attach some decorator introspection metadata onto your wrapper and return it.  Example: def print_hello_before_calling(target): def wrapper(*args, *kwargs): print('hello') return target(args, **kwargs) return tf_decorator.make_decorator(target, wrapper)  Derive from TFDecorator. If your decorator needs to be stateful, you can implement it in terms of a TFDecorator. Store whatever state you need in your derived class, and implement the __call__ method to do your work before calling into your target. You can retrieve the target via super(MyDecoratorClass, self).decorated_target, and call it with whatever parameters it needs.  Example: class CallCounter(tf_decorator.TFDecorator): def init(self, target): super(CallCounter, self).init('count_calls', target) self.call_count = 0 def call(self, *args, *kwargs): self.call_count += 1 return super(CallCounter, self).decorated_target(args, **kwargs) def count_calls(target): return CallCounter(target) Modules tf_stack module: Functions used to extract and analyze stacks. Faster than Python libs. Classes class TFDecorator: Base class for all TensorFlow decorators. Functions make_decorator(...): Make a decorator from a wrapper and a target. rewrap(...): Injects a new target into a function built by make_decorator. unwrap(...): Unwraps an object into a list of TFDecorators and a final target.


tf.compat.v1.flags.tf_decorator.make_decorator Make a decorator from a wrapper and a target.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.make_decorator
tf.compat.v1.flags.tf_decorator.make_decorator(
    target, decorator_func, decorator_name=None, decorator_doc='',
    decorator_argspec=None
)

 Args
  target   The final callable to be wrapped.
  decorator_func   The wrapper function.
  decorator_name   The name of the decorator. If None, the name of the function calling make_decorator.
  decorator_doc   Documentation specific to this application of decorator_func to target.
  decorator_argspec   The new callable signature of this decorator.

 Returns   The decorator_func argument with new metadata attached.


tf.compat.v1.flags.tf_decorator.rewrap Injects a new target into a function built by make_decorator.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.rewrap
tf.compat.v1.flags.tf_decorator.rewrap(
    decorator_func, previous_target, new_target
)
 This function allows replacing a function wrapped by decorator_func, assuming the decorator that wraps the function is written as described below. The decorator function must use <decorator name>.__wrapped__ instead of the wrapped function that is normally used: Example: Instead of this: def simple_parametrized_wrapper(*args, *kwds): return wrapped_fn(args, **kwds) tf_decorator.make_decorator(simple_parametrized_wrapper, wrapped_fn) Write this: def simple_parametrized_wrapper(*args, *kwds): return simple_parametrizedwrapper.wrapped_(args, **kwds) tf_decorator.make_decorator(simple_parametrized_wrapper, wrapped_fn) Note that this process modifies decorator_func.

 Args
  decorator_func   Callable returned by wrap.
  previous_target   Callable that needs to be replaced.
  new_target   Callable to replace previous_target with.

 Returns   The updated decorator. If decorator_func is not a tf_decorator, new_target is returned.


tf.compat.v1.flags.tf_decorator.TFDecorator Base class for all TensorFlow decorators.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.TFDecorator
tf.compat.v1.flags.tf_decorator.TFDecorator(
    decorator_name, target, decorator_doc='', decorator_argspec=None
)
 TFDecorator captures and exposes the wrapped target, and provides details about the current decorator.

 Attributes
  decorated_target

  decorator_argspec

  decorator_doc

  decorator_name
   Methods __call__ View source
__call__(
    *args, **kwargs
)
 Call self as a function.


Module: tf.compat.v1.flags.tf_decorator.tf_stack Functions used to extract and analyze stacks. Faster than Python libs.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack  Classes class CurrentModuleFilter: Filters stack frames from the module where this is used (best effort). class FrameSummary class StackSummary class StackTraceFilter: Allows filtering traceback information by removing superfluous frames. class StackTraceMapper: Allows remapping traceback information to different source code. class StackTraceTransform: Base class for stack trace transformation functions. Functions extract_stack(...): A lightweight, extensible re-implementation of traceback.extract_stack.


tf.compat.v1.flags.tf_decorator.tf_stack.CurrentModuleFilter Filters stack frames from the module where this is used (best effort). Inherits From: StackTraceFilter, StackTraceTransform  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack.CurrentModuleFilter
tf.compat.v1.flags.tf_decorator.tf_stack.CurrentModuleFilter()
 Methods get_filtered_filenames View source
get_filtered_filenames()
 reset View source
reset()
 __enter__ View source
__enter__()
 __exit__ View source
__exit__(
    unused_type, unused_value, unused_traceback
)


tf.compat.v1.flags.tf_decorator.tf_stack.extract_stack A lightweight, extensible re-implementation of traceback.extract_stack.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack.extract_stack
tf.compat.v1.flags.tf_decorator.tf_stack.extract_stack(
    limit=-1
)
 NOTE(mrry): traceback.extract_stack eagerly retrieves the line of code for each stack frame using linecache, which results in an abundance of stat() calls. This implementation does not retrieve the code, and any consumer should apply _convert_stack to the result to obtain a traceback that can be formatted etc. using traceback methods.

 Args
  limit   A limit on the number of frames to return.

 Returns   A sequence of FrameSummary objects (filename, lineno, name, line) corresponding to the call stack of the current thread.


tf.compat.v1.flags.tf_decorator.tf_stack.FrameSummary  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack.FrameSummary
tf.compat.v1.flags.tf_decorator.tf_stack.FrameSummary(
    *args, **kwargs
)

 Attributes
  filename

  line

  lineno

  name
   Methods __eq__
__eq__()
 eq(self: tensorflow.python._tf_stack.FrameSummary, arg0: tensorflow.python._tf_stack.FrameSummary) -> bool __getitem__
__getitem__()
 getitem(self: tensorflow.python._tf_stack.FrameSummary, arg0: object) -> object __iter__
__iter__()
 iter(self: tensorflow.python._tf_stack.FrameSummary) -> iterator __len__
__len__()
 len(self: tensorflow.python._tf_stack.FrameSummary) -> int __ne__
__ne__()
 ne(self: tensorflow.python._tf_stack.FrameSummary, arg0: tensorflow.python._tf_stack.FrameSummary) -> bool


tf.compat.v1.flags.tf_decorator.tf_stack.StackSummary  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack.StackSummary
tf.compat.v1.flags.tf_decorator.tf_stack.StackSummary()
 Methods append
append()
 append(self: tensorflow.python._tf_stack.StackSummary, x: tensorflow.python._tf_stack.FrameSummary) -> None Add an item to the end of the list count
count()
 count(self: tensorflow.python._tf_stack.StackSummary, x: tensorflow.python._tf_stack.FrameSummary) -> int Return the number of times x appears in the list extend
extend()
 extend(*args, **kwargs) Overloaded function.  extend(self: tensorflow.python._tf_stack.StackSummary, L: tensorflow.python._tf_stack.StackSummary) -> None  Extend the list by appending all the items in the given list  extend(self: tensorflow.python._tf_stack.StackSummary, L: iterable) -> None  Extend the list by appending all the items in the given list insert
insert()
 insert(self: tensorflow.python._tf_stack.StackSummary, i: int, x: tensorflow.python._tf_stack.FrameSummary) -> None Insert an item at a given position. pop
pop()
 pop(*args, **kwargs) Overloaded function.  pop(self: tensorflow.python._tf_stack.StackSummary) -> tensorflow.python._tf_stack.FrameSummary  Remove and return the last item  pop(self: tensorflow.python._tf_stack.StackSummary, i: int) -> tensorflow.python._tf_stack.FrameSummary  Remove and return the item at index i remove
remove()
 remove(self: tensorflow.python._tf_stack.StackSummary, x: tensorflow.python._tf_stack.FrameSummary) -> None Remove the first item from the list whose value is x. It is an error if there is no such item. __bool__
__bool__()
 bool(self: tensorflow.python._tf_stack.StackSummary) -> bool Check whether the list is nonempty __contains__
__contains__()
 contains(self: tensorflow.python._tf_stack.StackSummary, x: tensorflow.python._tf_stack.FrameSummary) -> bool Return true the container contains x __eq__
__eq__()
 eq(self: tensorflow.python._tf_stack.StackSummary, arg0: tensorflow.python._tf_stack.StackSummary) -> bool __getitem__
__getitem__()
 getitem(*args, **kwargs) Overloaded function.
getitem(self: tensorflow.python._tf_stack.StackSummary, s: slice) -> tensorflow.python._tf_stack.StackSummary  Retrieve list elements using a slice object  getitem(self: tensorflow.python._tf_stack.StackSummary, arg0: int) -> tensorflow.python._tf_stack.FrameSummary getitem(self: tensorflow.python._tf_stack.StackSummary, arg0: int) -> tensorflow.python._tf_stack.FrameSummary  __iter__
__iter__()
 iter(self: tensorflow.python._tf_stack.StackSummary) -> iterator __len__
__len__()
 len(self: tensorflow.python._tf_stack.StackSummary) -> int __ne__
__ne__()
 ne(self: tensorflow.python._tf_stack.StackSummary, arg0: tensorflow.python._tf_stack.StackSummary) -> bool


tf.compat.v1.flags.tf_decorator.tf_stack.StackTraceFilter Allows filtering traceback information by removing superfluous frames. Inherits From: StackTraceTransform  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack.StackTraceFilter  Methods get_filtered_filenames View source
get_filtered_filenames()
 reset View source
reset()
 __enter__ View source
__enter__()
 __exit__ View source
__exit__(
    unused_type, unused_value, unused_traceback
)


tf.compat.v1.flags.tf_decorator.tf_stack.StackTraceMapper Allows remapping traceback information to different source code. Inherits From: StackTraceTransform  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack.StackTraceMapper  Methods get_effective_source_map View source
get_effective_source_map()
 Returns a map (filename, lineno) -> (filename, lineno, function_name). reset View source
reset()
 __enter__ View source
__enter__()
 __exit__ View source
__exit__(
    unused_type, unused_value, unused_traceback
)


tf.compat.v1.flags.tf_decorator.tf_stack.StackTraceTransform Base class for stack trace transformation functions.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.tf_stack.StackTraceTransform  Methods reset View source
reset()
 __enter__ View source
__enter__()
 __exit__ View source
__exit__(
    unused_type, unused_value, unused_traceback
)


tf.compat.v1.flags.tf_decorator.unwrap Unwraps an object into a list of TFDecorators and a final target.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.tf_decorator.unwrap
tf.compat.v1.flags.tf_decorator.unwrap(
    maybe_tf_decorator
)

 Args
  maybe_tf_decorator   Any callable object.

 Returns   A tuple whose first element is an list of TFDecorator-derived objects that were applied to the final callable target, and whose second element is the final undecorated callable target. If the maybe_tf_decorator parameter is not decorated by any TFDecorators, the first tuple element will be an empty list. The TFDecorator list is ordered from outermost to innermost decorators.


tf.compat.v1.flags.UnparsedFlagAccessError Raised when accessing the flag value from unparsed FlagValues. Inherits From: Error  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.UnparsedFlagAccessError


tf.compat.v1.flags.UnrecognizedFlagError Raised when a flag is unrecognized. Inherits From: Error  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.UnrecognizedFlagError
tf.compat.v1.flags.UnrecognizedFlagError(
    flagname, flagvalue='', suggestions=None
)

 Attributes
  flagname   str, the name of the unrecognized flag.
  flagvalue   The value of the flag, empty if the flag is not defined.


tf.compat.v1.flags.ValidationError Raised when flag validator constraint is not satisfied. Inherits From: Error  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.ValidationError


tf.compat.v1.flags.validator A function decorator for defining a flag validator.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.validator
tf.compat.v1.flags.validator(
    flag_name, message='Flag validation failed',
    flag_values=_flagvalues.FLAGS
)
 Registers the decorated function as a validator for flag_name, e.g. @flags.validator('foo') def _CheckFoo(foo): ... See register_validator() for the specification of checker function.

 Args
  flag_name   str, name of the flag to be checked.
  message   str, error text to be shown to the user if checker returns False. If checker raises flags.ValidationError, message from the raised error will be shown.
  flag_values   flags.FlagValues, optional FlagValues instance to validate against.

 Returns   A function decorator that registers its function argument as a validator.

 Raises
  AttributeError   Raised when flag_name is not registered as a valid flag name.


tf.compat.v1.flags.WhitespaceSeparatedListParser Parser for a whitespace-separated list of strings. Inherits From: BaseListParser, ArgumentParser  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.app.flags.WhitespaceSeparatedListParser
tf.compat.v1.flags.WhitespaceSeparatedListParser(
    comma_compat=False
)

 Args
  comma_compat   bool, whether to support comma as an additional separator. If False then only whitespace is supported. This is intended only for backwards compatibility with flags that used to be comma-separated.    Methods flag_type
flag_type()
 See base class. parse
parse(
    argument
)
 Parses argument as whitespace-separated list of strings. It also parses argument as comma-separated list of strings if requested.

 Args
  argument   string argument passed in the commandline.

 Returns   [str], the parsed flag value.

 Class Variables
  syntactic_help   ''


tf.compat.v1.floor_div Returns x // y element-wise.
tf.compat.v1.floor_div(
    x, y, name=None
)

Note: floor_div supports broadcasting. More about broadcasting here

 Args
  x   A Tensor. Must be one of the following types: bfloat16, half, float32, float64, uint8, int8, uint16, int16, int32, int64, complex64, complex128.
  y   A Tensor. Must have the same type as x.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as x.


tf.compat.v1.foldl foldl on the list of tensors unpacked from elems on dimension 0.
tf.compat.v1.foldl(
    fn, elems, initializer=None, parallel_iterations=10, back_prop=True,
    swap_memory=False, name=None
)
 This foldl operator repeatedly applies the callable fn to a sequence of elements from first to last. The elements are made of the tensors unpacked from elems on dimension 0. The callable fn takes two tensors as arguments. The first argument is the accumulated value computed from the preceding invocation of fn, and the second is the value at the current position of elems. If initializer is None, elems must contain at least one element, and its first element is used as the initializer. Suppose that elems is unpacked into values, a list of tensors. The shape of the result tensor is fn(initializer, values[0]).shape`. This method also allows multi-arity elems and output of fn. If elems is a (possibly nested) list or tuple of tensors, then each of these tensors must have a matching first (unpack) dimension. The signature of fn may match the structure of elems. That is, if elems is (t1, [t2, t3, [t4, t5]]), then an appropriate signature for fn is: fn = lambda (t1, [t2, t3, [t4, t5]]):.

 Args
  fn   The callable to be performed.
  elems   A tensor or (possibly nested) sequence of tensors, each of which will be unpacked along their first dimension. The nested sequence of the resulting slices will be the first argument to fn.
  initializer   (optional) A tensor or (possibly nested) sequence of tensors, as the initial value for the accumulator.
  parallel_iterations   (optional) The number of iterations allowed to run in parallel.
  back_prop   (optional) True enables support for back propagation.
  swap_memory   (optional) True enables GPU-CPU memory swapping.
  name   (optional) Name prefix for the returned tensors.

 Returns   A tensor or (possibly nested) sequence of tensors, resulting from applying fn consecutively to the list of tensors unpacked from elems, from first to last.

 Raises
  TypeError   if fn is not callable.    Example: elems = tf.constant([1, 2, 3, 4, 5, 6])
sum = foldl(lambda a, x: a + x, elems)
# sum == 21


tf.compat.v1.foldr foldr on the list of tensors unpacked from elems on dimension 0.
tf.compat.v1.foldr(
    fn, elems, initializer=None, parallel_iterations=10, back_prop=True,
    swap_memory=False, name=None
)
 This foldr operator repeatedly applies the callable fn to a sequence of elements from last to first. The elements are made of the tensors unpacked from elems. The callable fn takes two tensors as arguments. The first argument is the accumulated value computed from the preceding invocation of fn, and the second is the value at the current position of elems. If initializer is None, elems must contain at least one element, and its first element is used as the initializer. Suppose that elems is unpacked into values, a list of tensors. The shape of the result tensor is fn(initializer, values[0]).shape. This method also allows multi-arity elems and output of fn. If elems is a (possibly nested) list or tuple of tensors, then each of these tensors must have a matching first (unpack) dimension. The signature of fn may match the structure of elems. That is, if elems is (t1, [t2, t3, [t4, t5]]), then an appropriate signature for fn is: fn = lambda (t1, [t2, t3, [t4, t5]]):.

 Args
  fn   The callable to be performed.
  elems   A tensor or (possibly nested) sequence of tensors, each of which will be unpacked along their first dimension. The nested sequence of the resulting slices will be the first argument to fn.
  initializer   (optional) A tensor or (possibly nested) sequence of tensors, as the initial value for the accumulator.
  parallel_iterations   (optional) The number of iterations allowed to run in parallel.
  back_prop   (optional) True enables support for back propagation.
  swap_memory   (optional) True enables GPU-CPU memory swapping.
  name   (optional) Name prefix for the returned tensors.

 Returns   A tensor or (possibly nested) sequence of tensors, resulting from applying fn consecutively to the list of tensors unpacked from elems, from last to first.

 Raises
  TypeError   if fn is not callable.    Example: elems = [1, 2, 3, 4, 5, 6]
sum = foldr(lambda a, x: a + x, elems)
# sum == 21


tf.compat.v1.gather   Gather slices from params axis axis according to indices.
tf.compat.v1.gather(
    params, indices, validate_indices=None, name=None, axis=None, batch_dims=0
)
 Gather slices from params axis axis according to indices. indices must be an integer tensor of any dimension (usually 0-D or 1-D). For 0-D (scalar) indices:  $$\begin{align*} output[p_0, ..., p_{axis-1}, && &&& p_{axis + 1}, ..., p_{N-1}] = \\ params[p_0, ..., p_{axis-1}, && indices, &&& p_{axis + 1}, ..., p_{N-1}] \end{align*}$$  Where N = ndims(params). For 1-D (vector) indices with batch_dims=0:  $$\begin{align*} output[p_0, ..., p_{axis-1}, && &i, &&p_{axis + 1}, ..., p_{N-1}] =\\ params[p_0, ..., p_{axis-1}, && indices[&i], &&p_{axis + 1}, ..., p_{N-1}] \end{align*}$$  In the general case, produces an output tensor where:  $$\begin{align*} output[p_0, &..., p_{axis-1}, & &i_{B}, ..., i_{M-1}, & p_{axis + 1}, &..., p_{N-1}] = \\ params[p_0, &..., p_{axis-1}, & indices[p_0, ..., p_{B-1}, &i_{B}, ..., i_{M-1}], & p_{axis + 1}, &..., p_{N-1}] \end{align*}$$  Where N = ndims(params), M = ndims(indices), and B = batch_dims. Note that params.shape[:batch_dims] must be identical to indices.shape[:batch_dims]. The shape of the output tensor is:  output.shape = params.shape[:axis] + indices.shape[batch_dims:] + params.shape[axis + 1:].  Note that on CPU, if an out of bound index is found, an error is returned. On GPU, if an out of bound index is found, a 0 is stored in the corresponding output value. See also tf.gather_nd.

 Args
  params   The Tensor from which to gather values. Must be at least rank axis + 1.
  indices   The index Tensor. Must be one of the following types: int32, int64. Must be in range [0, params.shape[axis]).
  validate_indices   Deprecated, does nothing.
  axis   A Tensor. Must be one of the following types: int32, int64. The axis in params to gather indices from. Must be greater than or equal to batch_dims. Defaults to the first non-batch dimension. Supports negative indexes.
  batch_dims   An integer. The number of batch dimensions. Must be less than or equal to rank(indices).
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as params.


tf.compat.v1.gather_nd   Gather slices from params into a Tensor with shape specified by indices.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.manip.gather_nd
tf.compat.v1.gather_nd(
    params, indices, name=None, batch_dims=0
)
 indices is an K-dimensional integer tensor, best thought of as a (K-1)-dimensional tensor of indices into params, where each element defines a slice of params: output[\\(i_0, ..., i_{K-2}\\)] = params[indices[\\(i_0, ..., i_{K-2}\\)]]
 Whereas in tf.gather indices defines slices into the first dimension of params, in tf.gather_nd, indices defines slices into the first N dimensions of params, where N = indices.shape[-1]. The last dimension of indices can be at most the rank of params: indices.shape[-1] <= params.rank
 The last dimension of indices corresponds to elements (if indices.shape[-1] == params.rank) or slices (if indices.shape[-1] < params.rank) along dimension indices.shape[-1] of params. The output tensor has shape indices.shape[:-1] + params.shape[indices.shape[-1]:]
 Additionally both 'params' and 'indices' can have M leading batch dimensions that exactly match. In this case 'batch_dims' must be M. Note that on CPU, if an out of bound index is found, an error is returned. On GPU, if an out of bound index is found, a 0 is stored in the corresponding output value. Some examples below. Simple indexing into a matrix: indices = [[0, 0], [1, 1]]
params = [['a', 'b'], ['c', 'd']]
output = ['a', 'd']
 Slice indexing into a matrix: indices = [[1], [0]]
params = [['a', 'b'], ['c', 'd']]
output = [['c', 'd'], ['a', 'b']]
 Indexing into a 3-tensor: indices = [[1]]
params = [[['a0', 'b0'], ['c0', 'd0']],
          [['a1', 'b1'], ['c1', 'd1']]]
output = [[['a1', 'b1'], ['c1', 'd1']]]

indices = [[0, 1], [1, 0]]
params = [[['a0', 'b0'], ['c0', 'd0']],
          [['a1', 'b1'], ['c1', 'd1']]]
output = [['c0', 'd0'], ['a1', 'b1']]

indices = [[0, 0, 1], [1, 0, 1]]
params = [[['a0', 'b0'], ['c0', 'd0']],
          [['a1', 'b1'], ['c1', 'd1']]]
output = ['b0', 'b1']
 The examples below are for the case when only indices have leading extra dimensions. If both 'params' and 'indices' have leading batch dimensions, use the 'batch_dims' parameter to run gather_nd in batch mode. Batched indexing into a matrix: indices = [[[0, 0]], [[0, 1]]]
params = [['a', 'b'], ['c', 'd']]
output = [['a'], ['b']]
 Batched slice indexing into a matrix: indices = [[[1]], [[0]]]
params = [['a', 'b'], ['c', 'd']]
output = [[['c', 'd']], [['a', 'b']]]
 Batched indexing into a 3-tensor: indices = [[[1]], [[0]]]
params = [[['a0', 'b0'], ['c0', 'd0']],
          [['a1', 'b1'], ['c1', 'd1']]]
output = [[[['a1', 'b1'], ['c1', 'd1']]],
          [[['a0', 'b0'], ['c0', 'd0']]]]

indices = [[[0, 1], [1, 0]], [[0, 0], [1, 1]]]
params = [[['a0', 'b0'], ['c0', 'd0']],
          [['a1', 'b1'], ['c1', 'd1']]]
output = [[['c0', 'd0'], ['a1', 'b1']],
          [['a0', 'b0'], ['c1', 'd1']]]

indices = [[[0, 0, 1], [1, 0, 1]], [[0, 1, 1], [1, 1, 0]]]
params = [[['a0', 'b0'], ['c0', 'd0']],
          [['a1', 'b1'], ['c1', 'd1']]]
output = [['b0', 'b1'], ['d0', 'c1']]
 Examples with batched 'params' and 'indices': batch_dims = 1
indices = [[1], [0]]
params = [[['a0', 'b0'], ['c0', 'd0']],
          [['a1', 'b1'], ['c1', 'd1']]]
output = [['c0', 'd0'], ['a1', 'b1']]

batch_dims = 1
indices = [[[1]], [[0]]]
params = [[['a0', 'b0'], ['c0', 'd0']],
          [['a1', 'b1'], ['c1', 'd1']]]
output = [[['c0', 'd0']], [['a1', 'b1']]]

batch_dims = 1
indices = [[[1, 0]], [[0, 1]]]
params = [[['a0', 'b0'], ['c0', 'd0']],
          [['a1', 'b1'], ['c1', 'd1']]]
output = [['c0'], ['b1']]
 See also tf.gather.

 Args
  params   A Tensor. The tensor from which to gather values.
  indices   A Tensor. Must be one of the following types: int32, int64. Index tensor.
  name   A name for the operation (optional).
  batch_dims   An integer or a scalar 'Tensor'. The number of batch dimensions.

 Returns   A Tensor. Has the same type as params.


tf.compat.v1.get_collection Wrapper for Graph.get_collection() using the default graph.
tf.compat.v1.get_collection(
    key, scope=None
)
 See tf.Graph.get_collection for more details.

 Args
  key   The key for the collection. For example, the GraphKeys class contains many standard names for collections.
  scope   (Optional.) If supplied, the resulting list is filtered to include only items whose name attribute matches using re.match. Items without a name attribute are never returned if a scope is supplied and the choice or re.match means that a scope without special tokens filters by prefix.

 Returns   The list of values in the collection with the given name, or an empty list if no value has been added to that collection. The list contains the values in the order under which they were collected.
 Eager Compatibility Collections are not supported when eager execution is enabled.