MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / parse_bool

Function parse_bool

tensorflow/contrib/training/python/training/hparam.py:279–288  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

277 if type_ == bool:
278
279 def parse_bool(value):
280 if value in ['true', 'True']:
281 return True
282 elif value in ['false', 'False']:
283 return False
284 else:
285 try:
286 return bool(int(value))
287 except ValueError:
288 _parse_fail(name, type_, value, values)
289
290 parse = parse_bool
291 else:

Callers

nothing calls this directly

Calls 1

_parse_failFunction · 0.85

Tested by

no test coverage detected