forked from mrq/DL-Art-School
Move loaded_options to util
Doesn't seem to work with python 3.6
This commit is contained in:
parent
2d8e9a9d30
commit
fc396baf1a
|
@ -5,8 +5,6 @@ import yaml
|
|||
from utils.util import OrderedYaml
|
||||
Loader, Dumper = OrderedYaml()
|
||||
|
||||
loaded_options = None
|
||||
|
||||
def parse(opt_path, is_train=True):
|
||||
with open(opt_path, mode='r') as f:
|
||||
opt = yaml.load(f, Loader=Loader)
|
||||
|
|
|
@ -127,7 +127,7 @@ def main():
|
|||
# torch.autograd.set_detect_anomaly(True)
|
||||
|
||||
# Save the compiled opt dict to the global loaded_options variable.
|
||||
option.loaded_options = opt
|
||||
util.loaded_options = opt
|
||||
|
||||
#### create train and val dataloader
|
||||
dataset_ratio = 1 # enlarge the size of each epoch
|
||||
|
|
|
@ -14,7 +14,6 @@ from torchvision.utils import make_grid
|
|||
from shutil import get_terminal_size
|
||||
import scp
|
||||
import paramiko
|
||||
from options.options import loaded_options
|
||||
from torch.utils.checkpoint import checkpoint
|
||||
|
||||
import yaml
|
||||
|
@ -23,6 +22,7 @@ try:
|
|||
except ImportError:
|
||||
from yaml import Loader, Dumper
|
||||
|
||||
loaded_options = None
|
||||
|
||||
def OrderedYaml():
|
||||
'''yaml orderedDict support'''
|
||||
|
|
Loading…
Reference in New Issue
Block a user