jw2yang commited on
Commit
44a5e23
1 Parent(s): bc3a9b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -91,7 +91,7 @@ def classify_image(inp):
91
  cam2 = show_cam_on_image(img_d, modulator, use_rgb=True)
92
 
93
  modulator = model.layers[0].blocks[2].modulation.modulator.norm(2, 1, keepdim=True)
94
- # modulator = nn.Upsample(size=img_t.shape[1:], mode='bilinear')(modulator)
95
  modulator = modulator.squeeze(1).detach().permute(1, 2, 0).numpy()
96
  modulator = (modulator - modulator.min()) / (modulator.max() - modulator.min())
97
  cam3 = show_cam_on_image(img_d, modulator, use_rgb=True)
 
91
  cam2 = show_cam_on_image(img_d, modulator, use_rgb=True)
92
 
93
  modulator = model.layers[0].blocks[2].modulation.modulator.norm(2, 1, keepdim=True)
94
+ modulator = nn.Upsample(size=img_t.shape[1:], mode='bilinear')(modulator)
95
  modulator = modulator.squeeze(1).detach().permute(1, 2, 0).numpy()
96
  modulator = (modulator - modulator.min()) / (modulator.max() - modulator.min())
97
  cam3 = show_cam_on_image(img_d, modulator, use_rgb=True)