mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-06 17:54:27 +00:00
Initial activations implementation
This commit is contained in:
14
include/functions/activations.cuh
Normal file
14
include/functions/activations.cuh
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <functional>
|
||||
|
||||
#ifndef ACTIVATIONS_H
|
||||
#define ACTIVATIONS_H
|
||||
|
||||
__device__ float sigmoid(float a);
|
||||
__device__ float relu(float a);
|
||||
__device__ float linear(float a);
|
||||
|
||||
__global__ void sigmoid_kernel(const float* __restrict__ src, float* __restrict__ dst, int len);
|
||||
__global__ void relu_kernel(const float* __restrict__ src, float* __restrict__ dst, int len);
|
||||
__global__ void linear_kernel(const float* __restrict__ src, float* __restrict__ dst, int len);
|
||||
|
||||
#endif // ACTIVATIONS_H
|
||||
Reference in New Issue
Block a user