mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-06 01:34:22 +00:00
Implement getting layer, weights and biases
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
#ifndef CUDANET_I_LAYER_H
|
||||
#define CUDANET_I_LAYER_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace CUDANet::Layers {
|
||||
|
||||
/**
|
||||
@@ -60,6 +62,12 @@ class WeightedLayer : public SequentialLayer {
|
||||
*/
|
||||
virtual void setWeights(const float* weights) = 0;
|
||||
|
||||
/**
|
||||
* @brief Virtual function for getting weights
|
||||
*
|
||||
*/
|
||||
virtual std::vector<float> getWeights() = 0;
|
||||
|
||||
/**
|
||||
* @brief Virtual function for setting biases
|
||||
*
|
||||
@@ -67,6 +75,12 @@ class WeightedLayer : public SequentialLayer {
|
||||
*/
|
||||
virtual void setBiases(const float* biases) = 0;
|
||||
|
||||
/**
|
||||
* @brief Virtual function for getting biases
|
||||
*
|
||||
*/
|
||||
virtual std::vector<float> getBiases() = 0;
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief Initialize the weights
|
||||
|
||||
Reference in New Issue
Block a user