optimizer = build_optimizer(cfg, model)
should be overwrite by
optimizer, param_wrapper = build_optimizer(cfg, model)
And you use function "auto_scale_hyperparams" in a trainer but in a plain training way. It may cause bugs when model does inferring.
In tools/plain_train_net.py, the training model should be initialized as:
data_loader = build_reid_train_loader(cfg)
cfg = auto_scale_hyperparams(cfg, data_loader.dataset.num_classes)
model = build_model(cfg)
optimizer = build_optimizer(cfg, model)
should be overwrite byoptimizer, param_wrapper = build_optimizer(cfg, model)
And you use function "auto_scale_hyperparams" in a trainer but in a plain training way. It may cause bugs when model does inferring. In tools/plain_train_net.py, the training model should be initialized as: