forked from JuheonYi/VESPCN-PyTorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
43 lines (37 loc) · 1015 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import torch
import data
import model
from option import args
from trainer import Trainer
from trainer_mc import Trainer_MC
from trainer_vsr import Trainer_VSR
from logger import logger
torch.manual_seed(args.seed)
chkp = logger.Logger(args)
if args.task == 'MC':
print("Selected task: MC")
model = model.Model(args, chkp)
loader = data.Data(args)
t = Trainer_MC(args, loader, model, chkp)
while not t.terminate():
t.train()
t.test()
elif args.task == 'Video':
print("Selected task: Video")
model = model.Model(args, chkp)
loader = data.Data(args)
t = Trainer_VSR(args, loader, model, chkp)
while not t.terminate():
t.train()
t.test()
elif args.task == 'Image':
print("Selected task: Image")
loader = data.Data(args)
model = model.Model(args, chkp)
t = Trainer(args, loader, model, chkp)
while not t.terminate():
t.train()
t.test()
else:
print('Please Enter Appropriate Task Type!!!')
chkp.done()