Satwickchikkala1 commited on
Commit
dd595eb
·
verified ·
1 Parent(s): 780aa84

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -31,7 +31,7 @@ def make_gradcam_heatmap(img_array, model, last_conv_layer_name):
31
  )
32
  with tf.GradientTape() as tape:
33
  last_conv_layer_output, preds = grad_model([img_array])
34
- class_channel = preds[0][:, 0]
35
  grads = tape.gradient(class_channel, last_conv_layer_output)
36
  pooled_grads = tf.reduce_mean(grads, axis=(0, 1, 2))
37
  last_conv_layer_output = last_conv_layer_output[0]
 
31
  )
32
  with tf.GradientTape() as tape:
33
  last_conv_layer_output, preds = grad_model([img_array])
34
+ class_channel = preds[0]
35
  grads = tape.gradient(class_channel, last_conv_layer_output)
36
  pooled_grads = tf.reduce_mean(grads, axis=(0, 1, 2))
37
  last_conv_layer_output = last_conv_layer_output[0]