Skip to content

question of scheduler in 2D-Tan #135

@yxG1005

Description

@yxG1005

In the code, the scheduler is set as

scheduler = optim.lr_scheduler.ReduceLROnPlateau(optimizer, factor=config.TRAIN.FACTOR, patience=config.TRAIN.PATIENCE, verbose=config.VERBOSE)
state['scheduler'].step(-val_state['loss_meter'].avg)

As official document of ReduceLROnPlateau, setting here means learning rate will change (lr = lr * factor) when metric didn't decrease in 20 epochs. (Equals to -val_state['loss_meter'].avg didn't decrease, equals to val loss didn't increase). However, when val loss increase, learning rate should change, this conflicted with the setting in code. I am confused with why here add "-" before val_state['loss_meter'].avg?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions