tf.compat.v1.flags.BooleanFlag | TensorFlow v2.16.1 (original) (raw)
tf.compat.v1.flags.BooleanFlag
Stay organized with collections Save and categorize content based on your preferences.
Basic boolean flag.
Inherits From: Flag
tf.compat.v1.flags.BooleanFlag(
name: Text,
default: Union[Optional[bool], Text],
help: Optional[Text],
short_name: Optional[Text] = None,
**args
) -> None
Boolean flags do not take any arguments, and their value is eitherTrue
(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() -> Text
Returns a str that describes the type of the flag.
parse
parse(
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. |
serialize
serialize() -> Text
Serializes the flag.
unparse
unparse() -> 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.