Initialize and use cuBLAS properly

This commit is contained in:
2024-02-10 17:17:07 +01:00
parent 3e6b7dc7e6
commit 22e33a395b
5 changed files with 35 additions and 12 deletions

View File

@@ -15,7 +15,8 @@ namespace Layers {
~Dense();
void forward(const float* input, float* output);
void to_cuda();
virtual void setWeights(const std::vector<std::vector<float>>& weights) = 0;
virtual void setBiases(const std::vector<float>& biases) = 0;
private:
int inputSize;
@@ -31,6 +32,7 @@ namespace Layers {
void initializeWeights();
void initializeBiases();
void toCuda();
};
} // namespace Layers

View File

@@ -11,7 +11,6 @@ namespace Layers {
virtual ~ILayer() {}
virtual void forward(const float* input, float* output) = 0;
virtual void to_cuda() = 0;
};
} // namespace Layers