Esempio n. 1
0
def load_config(args):
    config = util.unicode_to_utf8(
        json.load(open('%s.json' % args.model_path, 'rb')))
    for key, value in args.__args.items():
        try:
            config[key] = value.value
        except:
            config[key] = value

    return config
Esempio n. 2
0
def load_config(args):
    config = util.unicode_to_utf8(
        json.load(open(os.path.join(os.path.dirname(__file__), args.model_path + '.json'), 'rb')))
    for key, value in args.__args.items():
        try:
            config[key] = value.value
        except:
            config[key] = value

    return config