![]() |
IgANet
IgANets - Isogeometric Analysis Networks
|
LogSoftmax activation function. More...
#include </home/runner/work/iganet/iganet/include/layer.hpp>
Public Member Functions | |
LogSoftmax (const torch::nn::functional::LogSoftmaxFuncOptions &options) | |
LogSoftmax (int64_t dim) | |
~LogSoftmax () override=default | |
torch::Tensor | apply (const torch::Tensor &input) const override |
Applies the activation function to the given input. | |
torch::nn::functional::LogSoftmaxFuncOptions & | options () |
Returns non-constant reference to options. | |
const torch::nn::functional::LogSoftmaxFuncOptions & | options () const |
Returns constant reference to options. | |
virtual void | pretty_print (std::ostream &os=Log(log::info)) const noexcept override |
Returns a string representation of the activation function. | |
torch::serialize::InputArchive & | read (torch::serialize::InputArchive &archive, const std::string &key="logsoftmax") override |
Reads the activation function from a torch::serialize::InputArchive object. | |
torch::serialize::OutputArchive & | write (torch::serialize::OutputArchive &archive, const std::string &key="logsoftmax") const override |
Writes the activation function into a torch::serialize::OutputArchive object. | |
![]() | |
virtual | ~ActivationFunction ()=default |
Private Attributes | |
torch::nn::functional::LogSoftmaxFuncOptions | options_ |
Additional Inherited Members | |
![]() | |
virtual const std::string & | name () const noexcept |
Returns the full qualified name of the object. | |
![]() | |
at::optional< std::string > | name_ |
String storing the full qualified name of the object. | |
LogSoftmax activation function.
\[ \text{LogSigmoid}(x_i) = \log \left( \frac{\exp(x_i)}{\sum_j \exp(x_j)} \right) \]
where \( x \) is an \(n\)-dimensional input tensor
|
inlineexplicit |
|
inlineexplicit |
|
overridedefault |
|
inlineoverridevirtual |
Applies the activation function to the given input.
Implements iganet::ActivationFunction.
|
inline |
Returns non-constant reference to options.
|
inline |
Returns constant reference to options.
|
inlineoverridevirtualnoexcept |
Returns a string representation of the activation function.
Implements iganet::ActivationFunction.
|
inlineoverridevirtual |
Reads the activation function from a torch::serialize::InputArchive object.
Implements iganet::ActivationFunction.
|
inlineoverridevirtual |
Writes the activation function into a torch::serialize::OutputArchive object.
Implements iganet::ActivationFunction.
|
private |