File tree 3 files changed +3
-9
lines changed
3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,6 @@ def options(self):
20
20
name = "church_default" ,
21
21
patch_use_aggregation = False ,
22
22
),
23
- opt .specify (
24
- name = "church_conservative" ,
25
- patch_use_aggregation = False ,
26
- lambda_patch_R1 = 10.0 ,
27
- resume_iter = "24950k" ,
28
- ),
29
23
]
30
24
31
25
def train_options (self ):
@@ -45,7 +39,7 @@ def test_options(self):
45
39
return [opt .tag ("fig4" ).specify (
46
40
num_gpus = 1 ,
47
41
batch_size = 1 ,
48
- dataroot = "~/datasets/ testphotos/images_used_in_swapping_autoencoder_arxiv /church/fig4" ,
42
+ dataroot = "./ testphotos/church/fig4" ,
49
43
dataset_mode = "imagefolder" ,
50
44
preprocess = "scale_shortside" , # For testing, scale but don't crop
51
45
evaluation_metrics = "structure_style_grid_generation" ,
Original file line number Diff line number Diff line change 51
51
52
52
iter_counter .record_one_iteration ()
53
53
54
+ optimizer .save (iter_counter .steps_so_far )
54
55
print ('Training finished.' )
Original file line number Diff line number Diff line change @@ -54,8 +54,7 @@ def record_one_iteration(self):
54
54
self .steps_so_far += self .batch_size
55
55
56
56
def needs_saving (self ):
57
- return self .completed_training () or \
58
- (self .steps_so_far % self .opt .save_freq ) < self .batch_size
57
+ return (self .steps_so_far % self .opt .save_freq ) < self .batch_size
59
58
60
59
def needs_evaluation (self ):
61
60
return (self .steps_so_far >= self .opt .evaluation_freq ) and \
You can’t perform that action at this time.
0 commit comments