tomrb commited on
Commit
6921e5b
1 Parent(s): 6677bc7
yolov8-to/ultralytics/utils/loss.py CHANGED
@@ -517,7 +517,7 @@ class v8SegmentationLoss(v8DetectionLoss):
517
 
518
  # filtered_predictions = formatted_variables[i][:,fg_mask[i]]
519
  filtered_predictions = formatted_variables
520
- pred_phi , H_phi = calc_Phi(filtered_predictions.T,LSgrid.to('cuda'))
521
  if REG_LOSS == "level":
522
  pred_phi= torch.reshape(pred_phi,(nely+1,nelx+1,H_phi.shape[-1]))
523
  normalized = (pred_phi - pred_phi.min()) / (pred_phi.max() - pred_phi.min())
 
517
 
518
  # filtered_predictions = formatted_variables[i][:,fg_mask[i]]
519
  filtered_predictions = formatted_variables
520
+ pred_phi , H_phi = calc_Phi(filtered_predictions.T,LSgrid.to(self.device))
521
  if REG_LOSS == "level":
522
  pred_phi= torch.reshape(pred_phi,(nely+1,nelx+1,H_phi.shape[-1]))
523
  normalized = (pred_phi - pred_phi.min()) / (pred_phi.max() - pred_phi.min())