mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-06 01:34:22 +00:00
Add activations enum
This commit is contained in:
@@ -10,4 +10,10 @@ relu_kernel(const float* __restrict__ src, float* __restrict__ dst, int len);
|
||||
__global__ void
|
||||
linear_kernel(const float* __restrict__ src, float* __restrict__ dst, int len);
|
||||
|
||||
enum Activation {
|
||||
SIGMOID,
|
||||
RELU,
|
||||
LINEAR
|
||||
};
|
||||
|
||||
#endif // ACTIVATIONS_H
|
||||
@@ -16,7 +16,7 @@ class Dense : public ILayer {
|
||||
Dense(
|
||||
int inputSize,
|
||||
int outputSize,
|
||||
std::string activation,
|
||||
Activation activation,
|
||||
cublasHandle_t cublasHandle
|
||||
);
|
||||
~Dense();
|
||||
@@ -37,7 +37,7 @@ class Dense : public ILayer {
|
||||
std::vector<float> weights;
|
||||
std::vector<float> biases;
|
||||
|
||||
std::string activation;
|
||||
Activation activation;
|
||||
|
||||
void initializeWeights();
|
||||
void initializeBiases();
|
||||
|
||||
Reference in New Issue
Block a user