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