Spaces:
Runtime error
Runtime error
Scaled saliency
Browse files
app.py
CHANGED
@@ -48,6 +48,7 @@ class WebUI:
|
|
48 |
saliency = np.squeeze(np.moveaxis(saliency, 1, 3))
|
49 |
saliency[saliency >= 0.05] = 0.05
|
50 |
saliency[saliency <= -0.05] = -0.05
|
|
|
51 |
return saliency
|
52 |
|
53 |
def run(self):
|
|
|
48 |
saliency = np.squeeze(np.moveaxis(saliency, 1, 3))
|
49 |
saliency[saliency >= 0.05] = 0.05
|
50 |
saliency[saliency <= -0.05] = -0.05
|
51 |
+
saliency /= np.amax(np.abs(saliency))
|
52 |
return saliency
|
53 |
|
54 |
def run(self):
|