49 virtual const
float *
GetErrors() const noexcept = 0;
68 virtual
void Flush() noexcept {}
70 virtual std::map<std::string, TensorDescriptor>
GetStateDict()
const {
return {}; }
A deepity layer virtual class.
Definition Layer.h:40
virtual float * GetBeliefs() noexcept=0
Should return belief state z.
size_t nextSize
Size of output.
Definition Layer.h:76
virtual std::map< std::string, TensorDescriptor > GetStateDict() const
Returns a dictionary of this.
Definition Layer.h:70
virtual void UpdateWeights() noexcept=0
Updates the weights after state updates.
size_t size
Size of input.
Definition Layer.h:74
virtual void Flush() noexcept
Flushes remaining batches.
Definition Layer.h:68
virtual size_t GetBatchSize() const noexcept=0
Should return batch size.
virtual const float * GetErrors() const noexcept=0
Should return errors e.
virtual size_t GetOutputSize() const noexcept=0
Should return output size.
virtual void UpdateState() noexcept=0
Updates the states after calculation.
virtual float CalculateState() noexcept=0
Calculates the internal state of the layer.
virtual size_t GetInputSize() const noexcept=0
Should return input size.
This file exists to provide both Tensor.h and IComputeBackend.h with device types without introducing...
Definition Backend.cpp:10
A named, shaped view into a layer's weight/bias data, for ModelIO's save/load (see Layer::GetStateDic...
Definition Layer.h:34
std::vector< size_t > shape
Tensor's dimensions, e.g. {out, in}.
Definition Layer.h:36
float * data
Pointer to the tensor's first element.
Definition Layer.h:35