mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-06 01:34:22 +00:00
Implement simple input layer
This commit is contained in:
30
include/layers/input.cuh
Normal file
30
include/layers/input.cuh
Normal 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
|
||||
Reference in New Issue
Block a user