-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_test.py
44 lines (31 loc) · 875 Bytes
/
run_test.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
44
import sys
import numpy as np
import tensorflow as tf
# import tensorflow.compat.v1 as tf
# tf.compat.v1.disable_eager_execution()
from nets import *
from cfgs import *
from data import *
from clip_ops.clip_ops import *
from trainer import *
print(("Setting: %s"%(sys.argv[1])))
setting = sys.argv[1]
if setting == "aaa3":
cfg = aaa3.cfg
Net = unit_net.Net
Generator = uniform_01_generator.Generator
clip_op_lambda = (lambda x: clip_op_01(x))
Trainer = trainer.Trainer
elif setting == "Integrated_A":
cfg = Integrated_A.cfg
Net = unit_net.Net
Generator = uniform_01_generator.Generator
clip_op_lambda = (lambda x: clip_op_01(x))
Trainer = trainer.Trainer
else:
print("None selected")
sys.exit(0)
net = Net(cfg)
generator = Generator(cfg, 'test')
m = Trainer(cfg, "test", net, clip_op_lambda)
m.test(generator)