latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.nn.init.sparse_
- tensorplay.nn.init.sparse_(tensor, sparsity, std=0.01, generator=None)[source]
Fill the 2-D
tensorin-place as a sparse matrix.Each column gets
sparsity * rowszeroed entries (a random row subset per column); the remaining entries come from N(0, std^2).
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

