TensorPlay
latest (dev)
Copy
View Markdown

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 tensor in-place as a sparse matrix.

Each column gets sparsity * rows zeroed entries (a random row subset per column); the remaining entries come from N(0, std^2).

On this page

Ask DeepWiki