When can you reorder log operations?
-
09-12-2020 - |
Question
For example, you can reorder a softmax + nl (negative likelihood) to log_softmax + nll (negative log-likelihood)
Essentially changing log(softmax(x)) to softmax(log(x))
However, what are the rules to reordering logging of things?
La solution
In general, you cannot reorder like that. The example you give is a very special case that only works because softmax is based on the exponential function, which is the inverse function of the natural logarithm.
Licencié sous: CC-BY-SA avec attribution
Non affilié à datascience.stackexchange