

Class indices in the range [0, C) where C is the number of
     classes; if ignore_index is specified, this loss also accepts
     this class index (this index may not necessarily be in the class
     range). The unreduced (i.e. with "reduction" set to "'none'")
     loss for this case can be described as:
\ell(x, y) = L = \{l_1,\dots,l_N\}^\top, \quad l_n = - w_{y_n}
\log \frac{\exp(x_{n,y_n})}{\sum_{c=1}^C \exp(x_{n,c})} \cdot
\mathbb{1}\{y_n \not= \text{ignore\_index}\}

where x is the input, y is the target, w is the weight, C is the
 number of classes, and N spans the minibatch dimension as well as
 d_1, ..., d_k for the K-dimensional case. If "reduction" is not
 "'none'" (default "'mean'"), then
\ell(x, y) = \begin{cases}     \sum_{n=1}^N
\frac{1}{\sum_{n=1}^N w_{y_n} \cdot \mathbb{1}\{y_n \not=
\text{ignore\_index}\}} l_n, &      \text{if reduction} =
\text{`mean';}\\       \sum_{n=1}^N l_n,  &       \text{if


