FJDorfner commited on
Commit
fbff24b
1 Parent(s): 575d757

Upload Model_Class.py

Browse files
Files changed (1) hide show
  1. Model_Class.py +2 -1
Model_Class.py CHANGED
@@ -79,12 +79,13 @@ def load_and_classify_image(image_path, device):
79
 
80
  def make_GradCAM(image, device):
81
 
 
82
  gpu_model = model.to(device)
83
  image = image.to(device)
84
  model.eval()
85
  target_layers = [gpu_model.model.layer4[-1]]
86
 
87
- arr = image.numpy().squeeze()
88
  cam = GradCAM(model=gpu_model, target_layers=target_layers)
89
  targets = None
90
  grayscale_cam = cam(
 
79
 
80
  def make_GradCAM(image, device):
81
 
82
+ arr = image.numpy().squeeze()
83
  gpu_model = model.to(device)
84
  image = image.to(device)
85
  model.eval()
86
  target_layers = [gpu_model.model.layer4[-1]]
87
 
88
+
89
  cam = GradCAM(model=gpu_model, target_layers=target_layers)
90
  targets = None
91
  grayscale_cam = cam(