File size: 249 Bytes
e59f78e
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import yaml
from box import Box

def load_config(path):
    with open(path, 'r') as f:
        args = Box(yaml.safe_load(f))
        args.learning_rate = float(args.learning_rate)
        args.weight_decay = float(args.weight_decay)

    return args