Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
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)
|