VDIGPKU / M2Det

M2Det: A Single-Shot Object Detector based on Multi-Level Feature Pyramid Network
MIT License
1.45k stars 318 forks source link

UnboundLocalError: local variable 'lr' referenced before assignment #24

Closed 1451595897 closed 5 years ago

1451595897 commented 5 years ago

Hello! When I train the model,it shows that local variable 'lr' referenced before assignment.How can I deal with this problem? 图片

oshita-n commented 5 years ago

Edit utils / core.py as follows.from 71 line.

def adjust_learning_rate(optimizer, gamma, epoch, step_index, iteration, epoch_size, cfg):
    global lr
    if epoch <= 5:
    ~
    ~
    ...