We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7417fc3 commit 7f661e9Copy full SHA for 7f661e9
1 file changed
nda/optimizers/compressor.py
@@ -32,10 +32,10 @@ def random(x, a):
32
return x
33
if x.ndim == 2:
34
for i in range(x.shape[1]):
35
- zero_mask = xp.random.choice(dim, a, replace=False)
+ zero_mask = xp.random.choice(dim, dim - a, replace=False)
36
x[zero_mask, i] = 0
37
else:
38
39
x[zero_mask] = 0
40
41
0 commit comments