Implements a neural network builder for constructing and registering neural network layers.
More...
#include <NNBuilder.h>
|
|
| NNBuilder () |
| | Default constructor for NNBuilder.
|
| |
| | NNBuilder (std::string weightsFile, std::string biasFile) |
| | Constructor for NNBuilder with weights and bias files.
|
| |
|
| ~NNBuilder () |
| | Destructor for NNBuilder.
|
| |
| std::string | build () |
| | Builds and returns the computation string representing the neural network.
|
| |
| NNBuilder & | denseLayer (int units, int input_size, float *weights, float *bias, Activation ac) |
| | Adds a dense layer to the neural network.
|
| |
| NNBuilder & | denseLayer (int units, int input_size, Activation ac) |
| | Adds a dense layer to the neural network using weights and biases from files.
|
| |
| NNBuilder & | convLayer (int num_filters, int *dims, float *weights, float *bias, Activation ac) |
| | Adds a convolutional layer to the neural network.
|
| |
| NNBuilder & | maxPoolLayer (int side, int height, int width) |
| | Adds a max pooling layer to the neural network.
|
| |
Implements a neural network builder for constructing and registering neural network layers.
◆ NNBuilder()
| NNBuilder::NNBuilder |
( |
std::string | weightsFile, |
|
|
std::string | biasFile ) |
|
inline |
Constructor for NNBuilder with weights and bias files.
- Parameters
-
| weightsFile | Path to the file containing weights. |
| biasFile | Path to the file containing biases. |
◆ build()
| std::string NNBuilder::build |
( |
| ) |
|
|
inline |
Builds and returns the computation string representing the neural network.
- Returns
- The computation string.
◆ convLayer()
| NNBuilder & NNBuilder::convLayer |
( |
int | num_filters, |
|
|
int * | dims, |
|
|
float * | weights, |
|
|
float * | bias, |
|
|
Activation | ac ) |
|
inline |
Adds a convolutional layer to the neural network.
- Parameters
-
| num_filters | Number of filters in the convolutional layer. |
| dims | Dimensions of the filters. |
| weights | Pointer to the weights array. |
| bias | Pointer to the bias array. |
| ac | Activation function to apply after the convolutional layer. |
- Returns
- Reference to the NNBuilder object for method chaining.
◆ denseLayer() [1/2]
Adds a dense layer to the neural network using weights and biases from files.
- Parameters
-
| units | Number of units in the dense layer. |
| input_size | Size of the input to the dense layer. |
| ac | Activation function to apply after the dense layer. |
- Returns
- Reference to the NNBuilder object for method chaining.
◆ denseLayer() [2/2]
| NNBuilder & NNBuilder::denseLayer |
( |
int | units, |
|
|
int | input_size, |
|
|
float * | weights, |
|
|
float * | bias, |
|
|
Activation | ac ) |
|
inline |
Adds a dense layer to the neural network.
- Parameters
-
| units | Number of units in the dense layer. |
| input_size | Size of the input to the dense layer. |
| weights | Pointer to the weights array. |
| bias | Pointer to the bias array. |
| ac | Activation function to apply after the dense layer. |
- Returns
- Reference to the NNBuilder object for method chaining.
◆ maxPoolLayer()
| NNBuilder & NNBuilder::maxPoolLayer |
( |
int | side, |
|
|
int | height, |
|
|
int | width ) |
|
inline |
Adds a max pooling layer to the neural network.
- Parameters
-
| side | Size of the pooling window. |
| height | Height of the input feature map. |
| width | Width of the input feature map. |
- Returns
- Reference to the NNBuilder object for method chaining.
The documentation for this class was generated from the following file: