86 sTensor
forward(
const sTensor& batch)
const;
DataLocation
Enumerate to specify where data is located.
Definition: cache.h:24
Represents a single layer of a neural network.
Definition: layer.h:17
size_t outSize
The output size of the layer.
Definition: layer.h:31
~Layer()
The destructor of the layer object.
DataLocation location
The location of the layer.
Definition: layer.h:24
sTensor biases
The biases of the layer. Stored as a vector.
Definition: layer.h:55
size_t inSize
The input size to the layer.
Definition: layer.h:38
sTensor forward(const sTensor &batch) const
Forward one batch of data through the layer.
Definition: layer.cpp:86
Layer(size_t inSize, size_t outSize, std::string activation, DataLocation location)
Construct a new layer.
Definition: layer.cpp:68
std::string activation
The activation function.
Definition: layer.h:45
void applyGradients(size_t batchSize, float learningRate=0.01)
Apply the computed gradients.
Definition: layer.cpp:98
sTensor weights
The weights of the layer. Stored as a matrix.
Definition: layer.h:50
Header file declaring the Tensor class to represent multidimensional arrays.