Fix save_json(predn, batch) (#105)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
8b6466f731
commit
38d6df55cb
2 changed files with 18 additions and 23 deletions
|
|
@ -109,9 +109,6 @@ class BaseValidator:
|
|||
self.plot_val_samples(batch, batch_i)
|
||||
self.plot_predictions(batch, preds, batch_i)
|
||||
|
||||
if self.args.save_json:
|
||||
self.pred_to_json(preds, batch)
|
||||
|
||||
stats = self.get_stats()
|
||||
self.check_stats(stats)
|
||||
self.print_results()
|
||||
|
|
@ -126,8 +123,7 @@ class BaseValidator:
|
|||
with open(str(self.save_dir / "predictions.json"), 'w') as f:
|
||||
self.logger.info(f"Saving {f.name}...")
|
||||
json.dump(self.jdict, f) # flatten and save
|
||||
|
||||
stats = self.eval_json(stats)
|
||||
stats = self.eval_json(stats) # update stats
|
||||
return stats
|
||||
|
||||
def get_dataloader(self, dataset_path, batch_size):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue