MCPcopy
hub / github.com/hanzhanggit/StackGAN / cfg_from_file

Function cfg_from_file

misc/config.py:95–101  ·  view source on GitHub ↗

Load a config file and merge it into the default options.

(filename)

Source from the content-addressed store, hash-verified

93
94
95def cfg_from_file(filename):
96 """Load a config file and merge it into the default options."""
97 import yaml
98 with open(filename, 'r') as f:
99 yaml_cfg = edict(yaml.load(f))
100
101 _merge_a_into_b(yaml_cfg, __C)

Callers 4

run_exp.pyFile · 0.90
demo.pyFile · 0.90
run_exp.pyFile · 0.90

Calls 1

_merge_a_into_bFunction · 0.85

Tested by

no test coverage detected