|
LBANN
0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
|
Element-wise specific tensor operation sub-class. More...
#include <elementwise_operator.hpp>
Public Types | |
Public Types | |
| using | BaseType = Cloneable< HasAbstractFunction< ElementwiseOperator< InputT, OutputT, D > >, Operator< InputT, OutputT, D > > |
| using | InputTensorType = typename BaseType::InputTensorType |
| using | OutputTensorType = typename BaseType::OutputTensorType |
| using | ConstInputTensorType = typename BaseType::ConstInputTensorType |
| using | ConstOutputTensorType = typename BaseType::ConstOutputTensorType |
| using | LocalInputTensorType = utils::TensorView< InputT, D > |
| using | LocalOutputTensorType = utils::TensorView< OutputT, D > |
| using | ConstLocalInputTensorType = utils::ConstTensorView< InputT, D > |
| using | ConstLocalOutputTensorType = utils::ConstTensorView< OutputT, D > |
Public Member Functions | |
| ElementwiseOperator ()=default | |
| virtual | ~ElementwiseOperator ()=default |
Serialization | |
| template<typename ArchiveT > | |
| void | serialize (ArchiveT &ar) |
Public Member Functions inherited from lbann::Cloneable< T, Base > | |
| std::unique_ptr< T > | clone () const |
| Return an exception-safe, memory-safe copy of this object. More... | |
Protected Member Functions | |
Lifecycle management. | |
| ElementwiseOperator (ElementwiseOperator const &)=default | |
| ElementwiseOperator & | operator= (ElementwiseOperator const &)=default |
| ElementwiseOperator (ElementwiseOperator &&)=default | |
| ElementwiseOperator & | operator= (ElementwiseOperator &&)=default |
Local compute interface | |
| virtual void | fp_compute_local (std::vector< ConstLocalInputTensorType > input, std::vector< LocalOutputTensorType > output) const =0 |
| Local forward compute function. More... | |
| virtual void | bp_compute_local (std::vector< ConstLocalInputTensorType > input, std::vector< ConstLocalOutputTensorType > gradient_wrt_output, std::vector< LocalInputTensorType > gradient_wrt_input) const =0 |
| Local backward compute function. More... | |
Virtual compute interface | |
| void | fp_compute (std::vector< ConstInputTensorType > const &inputs, std::vector< OutputTensorType > const &outputs) const final |
| Apply operator's forward operation. More... | |
| void | bp_compute (std::vector< ConstInputTensorType > const &inputs, std::vector< ConstOutputTensorType > const &gradient_wrt_outputs, std::vector< InputTensorType > const &gradient_wrt_inputs) const final |
| Compute operator's "backward" operation. More... | |
| template<typename TensorViewType > | |
| static auto | get_local_tensor_views (std::vector< TensorViewType > const &in) |
Element-wise specific tensor operation sub-class.
This layer manages some of the
Definition at line 45 of file elementwise_operator.hpp.
| using lbann::ElementwiseOperator< InputT, OutputT, D >::BaseType = Cloneable<HasAbstractFunction<ElementwiseOperator<InputT, OutputT, D> >, Operator<InputT, OutputT, D> > |
Definition at line 55 of file elementwise_operator.hpp.
| using lbann::ElementwiseOperator< InputT, OutputT, D >::ConstInputTensorType = typename BaseType::ConstInputTensorType |
Definition at line 59 of file elementwise_operator.hpp.
| using lbann::ElementwiseOperator< InputT, OutputT, D >::ConstLocalInputTensorType = utils::ConstTensorView<InputT, D> |
Definition at line 64 of file elementwise_operator.hpp.
| using lbann::ElementwiseOperator< InputT, OutputT, D >::ConstLocalOutputTensorType = utils::ConstTensorView<OutputT, D> |
Definition at line 65 of file elementwise_operator.hpp.
| using lbann::ElementwiseOperator< InputT, OutputT, D >::ConstOutputTensorType = typename BaseType::ConstOutputTensorType |
Definition at line 60 of file elementwise_operator.hpp.
| using lbann::ElementwiseOperator< InputT, OutputT, D >::InputTensorType = typename BaseType::InputTensorType |
Definition at line 57 of file elementwise_operator.hpp.
| using lbann::ElementwiseOperator< InputT, OutputT, D >::LocalInputTensorType = utils::TensorView<InputT, D> |
Definition at line 62 of file elementwise_operator.hpp.
| using lbann::ElementwiseOperator< InputT, OutputT, D >::LocalOutputTensorType = utils::TensorView<OutputT, D> |
Definition at line 63 of file elementwise_operator.hpp.
| using lbann::ElementwiseOperator< InputT, OutputT, D >::OutputTensorType = typename BaseType::OutputTensorType |
Definition at line 58 of file elementwise_operator.hpp.
|
default |
|
virtualdefault |
|
protecteddefault |
|
protecteddefault |
|
inlinefinal |
Compute operator's "backward" operation.
Given the inputs, outputs, and gradient w.r.t. output tensors, the gradient w.r.t. input tensors are populated with the computed values.
Definition at line 123 of file elementwise_operator.hpp.
|
protectedpure virtual |
Local backward compute function.
|
inlinefinal |
Apply operator's forward operation.
Given the input tensors, the output tensors are populated with computed values.
Definition at line 107 of file elementwise_operator.hpp.
|
protectedpure virtual |
Local forward compute function.
|
inlinestatic |
|
protecteddefault |
|
protecteddefault |
|
inline |
Definition at line 77 of file elementwise_operator.hpp.