andy-wyx commited on
Commit
0e1410c
·
1 Parent(s): 1c93d1b

update image padding for xai

Browse files
Files changed (1) hide show
  1. explanations.py +1 -1
explanations.py CHANGED
@@ -31,7 +31,7 @@ def preprocess_image(image, output_size=(300, 300)):
31
  def show(img, output_size,p=False, **kwargs):
32
  img = np.array(img, dtype=np.float32)
33
 
34
- img = preprocess_image(img, output_size=output_size)
35
 
36
  # check if channel first
37
  if img.shape[0] == 1:
 
31
  def show(img, output_size,p=False, **kwargs):
32
  img = np.array(img, dtype=np.float32)
33
 
34
+ img = preprocess_image(img, output_size=(output_size,output_size))
35
 
36
  # check if channel first
37
  if img.shape[0] == 1: