Mercurial > repos > bgruening > bioimage_inference
diff main.py @ 5:d5233b9d32bb draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bioimaging commit 399a62ba78a6a3d7885c7df03cc7de37e1a7ec6f
| author | bgruening |
|---|---|
| date | Tue, 15 Apr 2025 15:39:28 +0000 |
| parents | 4fd6e8b051e9 |
| children |
line wrap: on
line diff
--- a/main.py Mon Apr 07 14:46:24 2025 +0000 +++ b/main.py Tue Apr 15 15:39:28 2025 +0000 @@ -108,8 +108,9 @@ # check if image dimensions are reversed reversed_order = list(reversed(range(exp_test_data.dim()))) exp_test_data_T = exp_test_data.permute(*reversed_order) - if exp_test_data_T.shape == target_image_dim: + if exp_test_data_T.shape == target_image_dim and exp_test_data.shape != target_image_dim: exp_test_data = exp_test_data_T + # check if image dimensions are not equal to target image dimensions if exp_test_data.shape != target_image_dim: for i in range(len(target_image_dim) - exp_test_data.dim()): exp_test_data = exp_test_data.unsqueeze(i)
