Skip to content

Commit

Permalink
fix learning rate
Browse files Browse the repository at this point in the history
  • Loading branch information
chengduozh committed May 21, 2019
1 parent cb819cf commit f14fe81
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Mask-RCNN/paddle/rcnn/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ def get_device_num():
def update_lr(args):
num_trainers = int(os.environ.get('PADDLE_TRAINERS_NUM', 1))
args.learning_rate = args.learning_rate / num_trainers
# TODO(zcd): The loss_cls or loss maybe NAN, so we decreate the learning rate here.
# The reasons for this should be analyzed in depth.
if num_trainers > 1:
args.learning_rate = args.learning_rate / 10

def train():
update_lr(cfg)
Expand Down

0 comments on commit f14fe81

Please sign in to comment.