RAIL-KNUST commited on
Commit
5b294cb
·
verified ·
1 Parent(s): 4d1141f

Upload 5 files

Browse files
Files changed (5) hide show
  1. 200_net_D_A.pth +3 -0
  2. 200_net_D_B.pth +3 -0
  3. 200_net_G_A.pth +3 -0
  4. 200_net_G_B.pth +3 -0
  5. test.py +40 -0
200_net_D_A.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1bef7b655f5532458f7c01e34f5465c9a3ea8026a910ebc92a81b49f77dc4630
3
+ size 11062960
200_net_D_B.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:41a7293491638c973ff7e5d772b19d8f7cb3caffe5b0e5e4ce6393fedc30ba03
3
+ size 11062960
200_net_G_A.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5dbc9c956d72ca5ce02810180d18d252e45033c04c8d14cb5dcd413e076cf8fd
3
+ size 46092008
200_net_G_B.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75361af53ae931dcac75a51a10c46ccec32bf8cddb8711f61156f69465172e01
3
+ size 46092008
test.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from options.test_options import TestOptions
3
+ from data import CreateDataLoader
4
+ from models import create_model
5
+ from util.visualizer import save_images
6
+ from util import html
7
+
8
+
9
+ if __name__ == '__main__':
10
+ opt = TestOptions().parse()
11
+ # hard-code some parameters for test
12
+ opt.num_threads = 1 # test code only supports num_threads = 1
13
+ opt.batch_size = 1 # test code only supports batch_size = 1
14
+ opt.serial_batches = True # no shuffle
15
+ opt.no_flip = True # no flip
16
+ opt.display_id = -1 # no visdom display
17
+ data_loader = CreateDataLoader(opt)
18
+ dataset = data_loader.load_data()
19
+ model = create_model(opt)
20
+ model.setup(opt)
21
+ # create a website
22
+ web_dir = os.path.join(opt.results_dir, opt.name, '%s_%s' % (opt.phase, opt.epoch))
23
+ webpage = html.HTML(web_dir, 'Experiment = %s, Phase = %s, Epoch = %s' % (opt.name, opt.phase, opt.epoch))
24
+ # test with eval mode. This only affects layers like batchnorm and dropout.
25
+ # pix2pix: we use batchnorm and dropout in the original pix2pix. You can experiment it with and without eval() mode.
26
+ # CycleGAN: It should not affect CycleGAN as CycleGAN uses instancenorm without dropout.
27
+ if opt.eval:
28
+ model.eval()
29
+ for i, data in enumerate(dataset):
30
+ if i >= opt.num_test:
31
+ break
32
+ model.set_input(data)
33
+ model.test()
34
+ visuals = model.get_current_visuals()
35
+ img_path = model.get_image_paths()
36
+ if i % 5 == 0:
37
+ print('processing (%04d)-th image... %s' % (i, img_path))
38
+ save_images(webpage, visuals, img_path, aspect_ratio=opt.aspect_ratio, width=opt.display_winsize)
39
+ # save the website
40
+ webpage.save()