Skip to content

Commit 7ff4d2e

Browse files
committed
Fix 3D
1 parent 1610034 commit 7ff4d2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytorch_grad_cam/utils/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def scale_cam_image(cam, target_size=None):
165165
img = img - np.min(img)
166166
img = img / (1e-7 + np.max(img))
167167
if target_size is not None:
168-
if len(img.shape) > 3:
168+
if len(img.shape) > 2:
169169
img = zoom(np.float32(img), [
170170
(t_s / i_s) for i_s, t_s in zip(img.shape, target_size[::-1])])
171171
else:

0 commit comments

Comments
 (0)