nn_init_sparse_ | R Documentation |
Fills the 2D input Tensor
as a sparse matrix, where the
non-zero elements will be drawn from the normal distribution
as described in Deep learning via Hessian-free optimization
- Martens, J. (2010).
nn_init_sparse_(tensor, sparsity, std = 0.01)
tensor |
an n-dimensional |
sparsity |
The fraction of elements in each column to be set to zero |
std |
the standard deviation of the normal distribution used to generate the non-zero values |
if (torch_is_installed()) {
## Not run:
w <- torch_empty(3, 5)
nn_init_sparse_(w, sparsity = 0.1)
## End(Not run)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.