ShichenLiu / CondenseNet

CondenseNet: Light weighted CNN for mobile devices
MIT License
694 stars 131 forks source link

is_best defining problem #27

Closed lizhenstat closed 5 years ago

lizhenstat commented 5 years ago

Hi, I notice there is a minor problem in the code https://github.com/ShichenLiu/CondenseNet/blob/master/main.py#L246

is_best = val_prec1 < best_prec1
best_prec1 = max(val_prec1, best_prec1)

should be changed to

is_best = val_prec1 < best_prec1
best_prec1 = min(val_prec1, best_prec1)

Since the val_prec1 returned from the train function is classification error rate Otherwise, the trainer will save results in every epoch

should also change best_prec1 = 100 in the begin