davanstrien HF Staff commited on
Commit
7eacab2
·
verified ·
1 Parent(s): e91a8da

Upload train.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. train.py +1 -1
train.py CHANGED
@@ -121,7 +121,7 @@ class LRWarmupCosine:
121
 
122
  def evaluate(model, loader, processor, device, num_eval=None):
123
  model.eval()
124
- metric = MeanAveragePrecision(class_metrics=True, iou_type="bbox")
125
  count = 0
126
  with torch.no_grad():
127
  for batch in tqdm(loader, desc="eval"):
 
121
 
122
  def evaluate(model, loader, processor, device, num_eval=None):
123
  model.eval()
124
+ metric = MeanAveragePrecision(class_metrics=True, iou_type="bbox", backend="faster_coco_eval")
125
  count = 0
126
  with torch.no_grad():
127
  for batch in tqdm(loader, desc="eval"):