ianpan commited on
Commit
1eebdfb
·
verified ·
1 Parent(s): 1d7a3e1

Upload model

Browse files
Files changed (1) hide show
  1. modeling.py +2 -2
modeling.py CHANGED
@@ -510,7 +510,7 @@ class TotalClassifierModel(PreTrainedModel):
510
 
511
  if 1 in crop_dims:
512
  # swap plane
513
- x = x0.transpose(1, 0, 2)
514
  smin1, smax1 = self.crop_single_plane(
515
  x, device, organ, threshold, buffer, speed_up
516
  )
@@ -519,7 +519,7 @@ class TotalClassifierModel(PreTrainedModel):
519
 
520
  if 2 in crop_dims:
521
  # swap plane
522
- x = x0.transpose(2, 1, 0)
523
  smin2, smax2 = self.crop_single_plane(
524
  x, device, organ, threshold, buffer, speed_up
525
  )
 
510
 
511
  if 1 in crop_dims:
512
  # swap plane
513
+ x = x0.swapaxes(1, 0)
514
  smin1, smax1 = self.crop_single_plane(
515
  x, device, organ, threshold, buffer, speed_up
516
  )
 
519
 
520
  if 2 in crop_dims:
521
  # swap plane
522
+ x = x0.transpose(2, 0)
523
  smin2, smax2 = self.crop_single_plane(
524
  x, device, organ, threshold, buffer, speed_up
525
  )