import os

from option import args
import torch
import utility
import data
import model
import loss
from trainer import Trainer

os.environ["CUDA_VISIBLE_DEVICES"] = '7， 8'
if __name__ == '__main__':
    torch.manual_seed(args.seed)
    checkpoint = utility.checkpoint(args)

    if checkpoint.ok:
        loader = data.Data(args)
        model = model.Model(args, checkpoint)
        loss = loss.Loss(args, checkpoint) if not args.test_only else None
        t = Trainer(args, loader, model, loss, checkpoint)
        # while not t.terminate():
        t.test()

        checkpoint.done()

# import cv2
#
# img  = cv2.imread('resultSR.png')
# print(img)
