ibrim commited on
Commit
7580432
1 Parent(s): 83f328a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,7 +6,7 @@ def process_images_gradcam(show_gradcam, gradcam_count, gradcam_layer, gradcam_o
6
  std=[4.0486, 4.1152, 3.8314])
7
  classes = ('plane', 'car', 'bird', 'cat', 'deer',
8
  'dog', 'frog', 'horse', 'ship', 'truck')
9
- misclassified_data = get_misclassified_data(modelfin, "cuda", test_loader)
10
  if gradcam_layer=="1":
11
  images = display_gradcam_output(misclassified_data, classes, inv_normalize, modelfin, target_layers= [modelfin.model.layer1[-1]], targets=None, number_of_samples=gradcam_count, transparency=gradcam_opacity)
12
  if gradcam_layer=="2":
@@ -19,7 +19,7 @@ def process_images_gradcam(show_gradcam, gradcam_count, gradcam_layer, gradcam_o
19
 
20
  def process_images_misclass(show_misclassify, misclassify_count):
21
  if show_misclassify:
22
- misclassified_data = get_misclassified_data(modelfin, "cuda", test_loader)
23
  image = display_cifar_misclassified_data(misclassified_data, classes, inv_normalize, number_of_samples=misclassify_count)
24
  return image
25
 
 
6
  std=[4.0486, 4.1152, 3.8314])
7
  classes = ('plane', 'car', 'bird', 'cat', 'deer',
8
  'dog', 'frog', 'horse', 'ship', 'truck')
9
+ misclassified_data = get_misclassified_data(modelfin, "cpu", test_loader)
10
  if gradcam_layer=="1":
11
  images = display_gradcam_output(misclassified_data, classes, inv_normalize, modelfin, target_layers= [modelfin.model.layer1[-1]], targets=None, number_of_samples=gradcam_count, transparency=gradcam_opacity)
12
  if gradcam_layer=="2":
 
19
 
20
  def process_images_misclass(show_misclassify, misclassify_count):
21
  if show_misclassify:
22
+ misclassified_data = get_misclassified_data(modelfin, "cpu", test_loader)
23
  image = display_cifar_misclassified_data(misclassified_data, classes, inv_normalize, number_of_samples=misclassify_count)
24
  return image
25