Fix: Runtime error
Browse files
app.py
CHANGED
@@ -87,7 +87,7 @@ def inference(input_img,
|
|
87 |
target_layers = [eval(f'model.{_layers[target_layer_number-1]}[0]')]
|
88 |
|
89 |
# Get the class activations from the selected layer
|
90 |
-
cam = GradCAM(model=model, target_layers=target_layers
|
91 |
grayscale_cam = cam(input_tensor=input_img, targets=None)
|
92 |
grayscale_cam = grayscale_cam[0, :]
|
93 |
|
|
|
87 |
target_layers = [eval(f'model.{_layers[target_layer_number-1]}[0]')]
|
88 |
|
89 |
# Get the class activations from the selected layer
|
90 |
+
cam = GradCAM(model=model, target_layers=target_layers)
|
91 |
grayscale_cam = cam(input_tensor=input_img, targets=None)
|
92 |
grayscale_cam = grayscale_cam[0, :]
|
93 |
|