You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/12/07 09:42:14 UTC

[GitHub] RobinDong opened a new pull request #8982: Change type of 'lr_refactor_ratio' to 'float' or else the learning-rate-refactor will never work

RobinDong opened a new pull request #8982: Change type of 'lr_refactor_ratio' to 'float' or else the learning-rate-refactor will never work
URL: https://github.com/apache/incubator-mxnet/pull/8982
 
 
   ## Description ##
   When training SSD with shell command:
   
   `python train.py --lr-steps '20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220' --lr-factor 0.5`
   
   It didn't change learning-rate for any epoch.
   
   ### Changes ###
   - Change type of 'lr_refactor_ratio' from 'str' to 'float'
   
   ## Comments ##
   - If we use "--lr-factor 0.5" in shell, the python code will consider lr_refactor_ratio' as "0.5" (string) and in the code below:
   > 
       assert lr_refactor_ratio > 0
       iter_refactor = [int(r) for r in lr_refactor_step.split(',') if r.strip()]
       if lr_refactor_ratio >= 1:
           return (learning_rate, None)
       else:
           lr = learning_rate
   
   The "0.5" >= 1  is true in Python, so the function "get_lr_scheduler()" will always return 'None' as lr_scheduler.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services