MCPcopy Create free account
hub / github.com/Anttwo/SuGaR / str2bool

Function str2bool

sugar_utils/general_utils.py:15–21  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

13 return torch.log(x/(1-x))
14
15def str2bool(v):
16 if isinstance(v, bool):
17 return v
18 if v.lower() in ('yes', 'true', 't', 'y', '1'):
19 return True
20 elif v.lower() in ('no', 'false', 'f', 'n', '0'):
21 return False
22
23def get_expon_lr_func(
24 lr_init, lr_final, lr_delay_steps=0, lr_delay_mult=1.0, max_steps=1000000

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected