From 879b2e963e081af8583ae0b3d300f28f80463501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaan=20Ak=C5=9Fit?= Date: Thu, 30 Nov 2023 12:59:27 +0000 Subject: [PATCH] Cosmetic changes. --- odak/learn/tools/matrix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odak/learn/tools/matrix.py b/odak/learn/tools/matrix.py index f5bbfbf1..e674d52d 100644 --- a/odak/learn/tools/matrix.py +++ b/odak/learn/tools/matrix.py @@ -118,8 +118,8 @@ def crop_center(field, size = None): hy = int(size[-1] // 2) cropped_padded = field[:, :, cx-hx:cx+hx, cy-hy:cy+hy] cropped = cropped_padded - if permute_flag == True: - field = field.permute(0, 2, 3, 1) + if permute_flag: + cropped = cropped.permute(0, 2, 3, 1) if len(orig_resolution) == 2: cropped = cropped_padded.squeeze(0).squeeze(0) if len(orig_resolution) == 3: