Skip to content

Commit 09cbade

Browse files
Fix DFM PyTorch inference (#1952)
Fix Dfm PyTorch inference Signed-off-by: Adrian Boguszewski <[email protected]> Co-authored-by: Samet Akcay <[email protected]>
1 parent 56fdacb commit 09cbade

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/anomalib/deploy/inferencers/torch_inferencer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,11 @@ def post_process(
267267
# Case III: Predictions could be a list of tensors.
268268
elif isinstance(predictions, Sequence):
269269
if isinstance(predictions[1], (torch.Tensor)):
270-
anomaly_map, pred_score = predictions
270+
pred_score, anomaly_map = predictions
271271
anomaly_map = anomaly_map.detach().cpu().numpy()
272272
pred_score = pred_score.detach().cpu().numpy()
273273
else:
274-
anomaly_map, pred_score = predictions
274+
pred_score, anomaly_map = predictions
275275
pred_score = pred_score.detach()
276276
else:
277277
msg = (

0 commit comments

Comments
 (0)