Skip to content

Commit

Permalink
fix bugs with python2
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewekhalel committed Nov 21, 2018
1 parent 1cf27cc commit 772604c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions edafa/BasePredictor.py
Expand Up @@ -99,8 +99,8 @@ def apply_aug(self,img):
:returns: a set of augmentations of original image
"""
shp = img.shape
aug_patch = np.zeros((len(self.augs),*shp),dtype=img.dtype)
h,w,c = img.shape
aug_patch = np.zeros((len(self.augs),h,w,c),dtype=img.dtype)
for i,aug in enumerate(self.augs):
aug_patch[i] = apply(aug,img,self.bits)
return aug_patch
Expand Down
4 changes: 2 additions & 2 deletions edafa/SegPredictor.py
Expand Up @@ -53,8 +53,8 @@ def _predict_single(self,img,overlap=0):
:return: prediction on the image
"""
shp = img.shape[:2]
output = np.zeros((*shp,self.out_channels))
h,w = img.shape[:2]
output = np.zeros((h,w,self.out_channels))
times = np.zeros(img.shape[:2])

img = add_reflections(img,self.in_patch_size,self.out_patch_size)
Expand Down

0 comments on commit 772604c

Please sign in to comment.