From b01c49bd68f2af0a9702e46f08e3ceb95661d740 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Fri, 5 Apr 2024 12:50:05 +0200 Subject: [PATCH] Fix Dfm PyTorch inference Signed-off-by: Adrian Boguszewski --- src/anomalib/deploy/inferencers/torch_inferencer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/anomalib/deploy/inferencers/torch_inferencer.py b/src/anomalib/deploy/inferencers/torch_inferencer.py index b7eef88058..8f18f0146d 100644 --- a/src/anomalib/deploy/inferencers/torch_inferencer.py +++ b/src/anomalib/deploy/inferencers/torch_inferencer.py @@ -267,11 +267,11 @@ def post_process( # Case III: Predictions could be a list of tensors. elif isinstance(predictions, Sequence): if isinstance(predictions[1], (torch.Tensor)): - anomaly_map, pred_score = predictions + pred_score, anomaly_map = predictions anomaly_map = anomaly_map.detach().cpu().numpy() pred_score = pred_score.detach().cpu().numpy() else: - anomaly_map, pred_score = predictions + pred_score, anomaly_map = predictions pred_score = pred_score.detach() else: msg = (