nn_contrib_sparsemax {torch} | R Documentation |
Sparsemax activation
Description
Sparsemax activation module.
Usage
nn_contrib_sparsemax(dim = -1)
Arguments
dim |
The dimension over which to apply the sparsemax function. (-1) |
Details
The SparseMax activation is described in 'From Softmax to Sparsemax: A Sparse Model of Attention and Multi-Label Classification' The implementation is based on aced125/sparsemax
[Package torch version 0.13.0 Index]