Shortcuts

pytorch_lightning.utilities.parsing module

pytorch_lightning.utilities.parsing.clean_namespace(hparams)[source]

Removes all functions from hparams so we can pickle :param _sphinx_paramlinks_pytorch_lightning.utilities.parsing.clean_namespace.hparams: :return:

pytorch_lightning.utilities.parsing.strtobool(val)[source]

Convert a string representation of truth to true (1) or false (0). Copied from the python implementation distutils.utils.strtobool

True values are ‘y’, ‘yes’, ‘t’, ‘true’, ‘on’, and ‘1’; false values are ‘n’, ‘no’, ‘f’, ‘false’, ‘off’, and ‘0’. Raises ValueError if ‘val’ is anything else.

>>> strtobool('YES')
1
>>> strtobool('FALSE')
0