We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6d98749 + e50e827 commit 8549e0eCopy full SHA for 8549e0e
art/defences/postprocessor/gaussian_noise.py
@@ -69,7 +69,7 @@ def __call__(self, preds: np.ndarray) -> np.ndarray:
69
# Finally normalize probability output
70
if all_probability:
71
post_preds[post_preds < 0.0] = 0.0
72
- sums = np.sum(post_preds, axis=1)
+ sums = np.sum(post_preds, axis=1, keepdims=True)
73
post_preds /= sums
74
else:
75
0 commit comments