Basic enum flag; its value can be any string from list of enum_values.
Inherits From: Flag
tf.compat.v1.flags.EnumFlag(
name: Text,
default: Optional[Text],
help: Optional[Text],
enum_values: Iterable[Text],
short_name: Optional[Text] = None,
case_sensitive: bool = True,
**args
)
| Attributes | |
|---|---|
value | |
flag_typeflag_type() -> Text
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.
parseparse(
argument: Union[Text, Optional[_T]]
) -> None
Parses string and sets flag value.
| Args | |
|---|---|
argument | str or the correct flag value type, argument to be parsed. |
serializeserialize() -> Text
Serializes the flag.
unparseunparse() -> None
__bool____bool__()
__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.
© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/compat/v1/flags/EnumFlag