tf.compat.v1.flags.BooleanFlag

Basic boolean flag.

Inherits From: Flag

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.

value

Methods

flag_type

Returns a str that describes the type of the flag.

parse

Parses string and sets flag value.

Args
argument str or the correct flag value type, argument to be parsed.

serialize

Serializes the flag.

unparse

__bool__

__eq__

Return self==value.

__ge__

Return a >= b. Computed by @total_ordering from (not a < b).

__gt__

Return a > b. Computed by @total_ordering from (not a < b) and (a != b).

__le__

Return a <= b. Computed by @total_ordering from (a < b) or (a == b).

__lt__

Return self<value.