OpenNN
Open-source neural networks library
Loading...
Searching...
No Matches
forward_propagation.h
Go to the documentation of this file.
1// OpenNN: Open Neural Networks Library
2// www.opennn.net
3//
4// F O R W A R D P R O P A G A T I O N H E A D E R
5//
6// Artificial Intelligence Techniques SL
7// artelnics@artelnics.com
8
9#pragma once
10
11#include "tensor_utilities.h"
12
13namespace opennn
14{
15
16class NeuralNetwork;
17
20{
24 ForwardPropagation(const Index = 0, NeuralNetwork* = nullptr);
25
29 void set(const Index = 0, NeuralNetwork* = nullptr);
30
33
36
38 void print() const;
39
40 Index batch_size = 0;
41
43
45 vector<vector<vector<TensorView>>> views;
46};
47
48}
Container of layers forming a feed-forward neural network, with parameter storage and I/O.
Definition neural_network.h:20
Definition adaptive_moment_estimation.h:14
Owning raw byte buffer that lives on CPU or CUDA memory, with aligned (re)allocation.
Definition tensor_utilities.h:166
Buffer data
Definition forward_propagation.h:44
vector< vector< vector< TensorView > > > views
Definition forward_propagation.h:45
ForwardPropagation(const Index=0, NeuralNetwork *=nullptr)
Constructs a workspace for the given batch size and network.
void set(const Index=0, NeuralNetwork *=nullptr)
Reconfigures the workspace for a new batch size or network; reuses allocations when possible.
Index batch_size
Definition forward_propagation.h:40
NeuralNetwork * neural_network
Definition forward_propagation.h:42
TensorView get_outputs() const
Returns the final output tensor of the network.
void print() const
Prints a human-readable summary of the workspace contents.
TensorView get_last_trainable_layer_outputs() const
Returns the output tensor of the last trainable layer.
Non-owning view over a tensor: pointer, shape, and data type with rich reshape helpers.
Definition tensor_utilities.h:293