train_tools.utils — spacr 0.5.0 documentation

# train_tools.utils

## Module Contents

class train_tools.utils.ConfLoader(conf_name)

  Load json config file using DictWithAttributeAccess object_hook. ConfLoader(conf_name).opt attribute is the result of loading json config file.

  class DictWithAttributeAccess

    Bases: `dict`

    This inner class makes dict to be accessed same as class attribute. For example, you can use opt.key instead of the opt[‘key’].

  conf_name
  opt

train_tools.utils.directory_setter(path='./results', make_dir=False)

  Make dictionary if not exists.

train_tools.utils.random_seeder(seed)

  Fix randomness.

train_tools.utils.pprint_config(opt)