Update app.py
Browse files
app.py
CHANGED
@@ -66,8 +66,9 @@ def predict(input_image:Image.Image, true_label:str):
|
|
66 |
|
67 |
target_layers=[model.block8.branch1[-1]]
|
68 |
use_cuda = True if torch.cuda.is_available() else False
|
69 |
-
|
70 |
-
cam = GradCAM(model=model, target_layers=target_layers)
|
|
|
71 |
targets = [ClassifierOutputTarget(0)]
|
72 |
|
73 |
grayscale_cam = cam(input_tensor=face, targets=targets, eigen_smooth=True)
|
|
|
66 |
|
67 |
target_layers=[model.block8.branch1[-1]]
|
68 |
use_cuda = True if torch.cuda.is_available() else False
|
69 |
+
#print ("Cuda :: ", use_cuda)
|
70 |
+
cam = GradCAM(model=model, target_layers=target_layers)
|
71 |
+
#, use_cuda=use_cuda)
|
72 |
targets = [ClassifierOutputTarget(0)]
|
73 |
|
74 |
grayscale_cam = cam(input_tensor=face, targets=targets, eigen_smooth=True)
|