andy-wyx commited on
Commit
6dd79e3
·
1 Parent(s): 2585875

debugging xai output distortion

Browse files
Files changed (1) hide show
  1. explanations.py +4 -0
explanations.py CHANGED
@@ -30,8 +30,12 @@ def preprocess_image(image, output_size=(300, 300)):
30
 
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:
 
30
 
31
  def show(img, output_size,p=False, **kwargs):
32
  img = np.array(img, dtype=np.float32)
33
+ h, w = img.shape[:2]
34
+ print(h,w)
35
 
36
  img = preprocess_image(img, output_size=(output_size,output_size))
37
+ h, w = img.shape[:2]
38
+ print(h,w)
39
 
40
  # check if channel first
41
  if img.shape[0] == 1: