|
OpenNN
Open-source neural networks library
|
Declares the Layer abstract base class and the LayerType enumeration. More...
#include "tensor_utilities.h"#include "math_utilities.h"#include "random_utilities.h"#include "string_utilities.h"#include "forward_propagation.h"#include "back_propagation.h"Go to the source code of this file.
Classes | |
| class | opennn::Layer |
| Abstract base class for every layer in an OpenNN NeuralNetwork. More... | |
Namespaces | |
| namespace | opennn |
Macros | |
| #define | FORCE_INLINE inline |
| Compiler-specific always-inline hint. | |
Enumerations | |
| enum class | opennn::LayerType { opennn::Addition , opennn::Bounding , opennn::Convolutional , opennn::ConvolutionalRelu , opennn::Dense , opennn::DenseRelu , opennn::Embedding , opennn::Flatten , opennn::MultiHeadAttention , opennn::Normalization3d , opennn::Pooling , opennn::Pooling3d , opennn::Recurrent , opennn::Scaling , opennn::Unscaling } |
| Identifier for every concrete Layer subclass supported by OpenNN. More... | |
Functions | |
| const EnumMap< LayerType > & | opennn::layer_type_map () |
| Returns the singleton string<->enum mapping for LayerType values. | |
| const string & | opennn::layer_type_to_string (LayerType type) |
| Converts a LayerType to its canonical string name. | |
| LayerType | opennn::string_to_layer_type (const string &name) |
| Parses a LayerType from its canonical string name. | |
| vector< Shape > | opennn::spec_shapes (const vector< pair< Shape, Type > > &specs) |
| Extracts the shape component from a list of (Shape, Type) specs. | |
| vector< Type > | opennn::spec_dtypes (const vector< pair< Shape, Type > > &specs) |
| Extracts the dtype component from a list of (Shape, Type) specs. | |
Declares the Layer abstract base class and the LayerType enumeration.
Every layer type in OpenNN (Dense, Convolutional, Recurrent, Embedding, ...) derives from Layer and implements the shape, parameter and propagation interface defined here. Layers are stateless with respect to batch data: forward and backward intermediates are stored in ForwardPropagation and BackPropagation objects owned by the caller.
| #define FORCE_INLINE inline |
Compiler-specific always-inline hint.
Resolves to __forceinline on MSVC, __attribute__((always_inline)) inline on GCC/Clang, and plain inline on other compilers.