When I evaluate model in the after_train function and record results, the result will not be recorded in Tensorboard and metrics.json
This is because detectron2.utils.events.TensorboardXWriter and JSONWriter will check the trainer.iter, and each iter will only record once.
If you do not set trainer.iter+1 before executing after_train, the execution result will not be recorded, because the current trainer.iter has been used in the last step
When I evaluate model in the
after_train
function and record results, the result will not be recorded inTensorboard
andmetrics.json
This is because detectron2.utils.events.
TensorboardXWriter
andJSONWriter
will check thetrainer.iter
, and each iter will only record once. If you do not settrainer.iter+1
before executingafter_train
, the execution result will not be recorded, because the current trainer.iter has been used in the last stepSo I fixed this issue in
train_loop
function