Struct LogSoftmaxFuncOptions
Defined in File activation.h
Page Contents
Struct Documentation
-
struct LogSoftmaxFuncOptions
Options for
torch::nn::functional::log_softmax
.Example:
namespace F = torch::nn::functional; F::log_softmax(input, LogSoftmaxFuncOptions(1));
Public Functions
-
inline auto dim(const int64_t &new_dim) -> decltype(*this)
Dimension along which LogSoftmax will be computed.
-
inline auto dtype(const std::optional<torch::Dtype> &new_dtype) -> decltype(*this)
the desired data type of returned tensor.
If specified, the input tensor is casted to
dtype
before the operation is performed. This is useful for preventing data type overflows. Default: None.
-
inline auto dtype(std::optional<torch::Dtype> &&new_dtype) -> decltype(*this)
-
inline const std::optional<torch::Dtype> &dtype() const noexcept
-
inline std::optional<torch::Dtype> &dtype() noexcept
-
inline auto dim(const int64_t &new_dim) -> decltype(*this)