We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd73e45 commit 4eaf9e4Copy full SHA for 4eaf9e4
models/base_model.py
@@ -41,6 +41,7 @@ def __init__(self, opt):
41
self.visual_names = []
42
self.optimizers = []
43
self.image_paths = []
44
+ self.metric = 0 # used for learning rate policy 'plateau'
45
46
@staticmethod
47
def modify_commandline_options(parser, is_train):
@@ -115,7 +116,7 @@ def get_image_paths(self):
115
116
def update_learning_rate(self):
117
"""Update learning rates for all the networks; called at the end of every epoch"""
118
for scheduler in self.schedulers:
- scheduler.step()
119
+ scheduler.step(self.metric)
120
lr = self.optimizers[0].param_groups[0]['lr']
121
print('learning rate = %.7f' % lr)
122
0 commit comments