Skip to content

Commit

Permalink
Cosmetic changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaanaksit committed Nov 30, 2023
1 parent b4a86b5 commit 879b2e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions odak/learn/tools/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 879b2e9

Please sign in to comment.