astonzhang commented on a change in pull request #7760: Add learning rate 
properties to gluon trainer and optimizer
URL: https://github.com/apache/incubator-mxnet/pull/7760#discussion_r137874579
 
 

 ##########
 File path: python/mxnet/optimizer.py
 ##########
 @@ -154,6 +161,12 @@ def create_optimizer(name, **kwargs):
         else:
             raise ValueError('Cannot find optimizer %s' % name)
 
+    @property
+    def learning_rate(self):
+        if self.lr_scheduler is not None:
+            return self.lr_scheduler.base_lr
 
 Review comment:
   resolved
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to