Implement simple input layer

This commit is contained in:
2024-03-12 21:16:46 +01:00
parent 9d91896f13
commit 708164e4d0
5 changed files with 82 additions and 1 deletions

30
include/layers/input.cuh Normal file
View File

@@ -0,0 +1,30 @@
#ifndef INPUT_LAYER_H
#define INPUT_LAYER_H
#include <ilayer.cuh>
namespace Layers {
class Input : public ILayer {
public:
Input(int inputSize);
~Input();
float* forward(const float* input);
void setWeights(const float* weights);
void setBiases(const float* biases);
private:
void initializeWeights();
void initializeBiases();
void toCuda();
int inputSize;
float* d_output;
};
} // namespace Layers
#endif // INPUT_LAYER_H