def __init__(self, args):
    self.args = args
    self.n_levels = 3
    self.scale = 0.5
    self.chns = (3 if (self.args.model == 'color') else 1)
    self.crop_size = 256
    self.data_list = open(args.datalist, 'rt').read().splitlines()
    self.data_list = list(map((lambda x: x.split(' ')), self.data_list))
    random.shuffle(self.data_list)
    self.train_dir = os.path.join('./checkpoints', args.model)
    if (not os.path.exists(self.train_dir)):
        os.makedirs(self.train_dir)
    self.batch_size = args.batch_size
    self.epoch = args.epoch
    self.data_size = (len(self.data_list) // self.batch_size)
    self.max_steps = int((self.epoch * self.data_size))
    self.learning_rate = args.learning_rate
def __init__(self, args):
    self.args = args
    self.n_levels = 3
    self.scale = 0.5
    self.chns = (3 if (self.args.model == 'color') else 1)
    self.crop_size = 256
    self.data_list = open(args.datalist, 'rt').read().splitlines()
    self.data_list = list(map((lambda x: x.split(' ')), self.data_list))
    random.shuffle(self.data_list)
    self.train_dir = os.path.join('./checkpoints', args.model)
    if (not os.path.exists(self.train_dir)):
        os.makedirs(self.train_dir)
    self.batch_size = args.batch_size
    self.epoch = args.epoch
    self.data_size = (len(self.data_list) // self.batch_size)
    self.max_steps = int((self.epoch * self.data_size))
    self.learning_rate = args.learning_rate