Function torch::special::log_softmax¶
Defined in File special.h
Function Documentation¶
-
Tensor
torch::special
::
log_softmax
(const Tensor &self, int64_t dim, c10::optional<ScalarType> dtype)¶ Computes log followed by softmax(x) of the input See https://pytorch.org/docs/master/special.html#torch.special.log_softmax.
Example:
auto t = torch::randn(128, 128, dtype=kDouble); torch::special::log_softmax(t, 0);