Skip to content

Commit 6eed2e1

Browse files
committed
Make metric calculation in denoising more robust
1 parent e446423 commit 6eed2e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

biapy/engine/denoising.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def metric_calculation(
233233

234234
with torch.no_grad():
235235
for i, metric in enumerate(list_to_use):
236-
val = metric(_output, _targets[:, _output.shape[1]:].contiguous())
236+
val = metric(_output.contiguous(), _targets[:, _output.shape[1]:].contiguous())
237237
val = val.item() if not torch.isnan(val) else 0
238238
out_metrics[list_names_to_use[i]] = val
239239

0 commit comments

Comments
 (0)