mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-06 01:34:22 +00:00
Add running mean and running var to batchnorm
This commit is contained in:
@@ -141,7 +141,6 @@ __global__ void vec_exp(
|
||||
* @param src Device pointer to source vector
|
||||
* @param dst Device pointer to destination vector
|
||||
* @param len Length of the vector
|
||||
* @return __global__
|
||||
*/
|
||||
__global__ void vec_sqrt(
|
||||
const float* __restrict__ src,
|
||||
@@ -149,6 +148,23 @@ __global__ void vec_sqrt(
|
||||
const unsigned int len
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Scales the vector by 1/sqrt(scale + epsilon)
|
||||
*
|
||||
* @param src Device pointer to source vector
|
||||
* @param dst Device pointer to destination vector
|
||||
* @param scale Scale
|
||||
* @param epsilon Epsilon
|
||||
* @param len Length of the vector
|
||||
*/
|
||||
__global__ void vec_scale(
|
||||
const float* __restrict__ src,
|
||||
float* __restrict__ dst,
|
||||
const float* __restrict__ scale,
|
||||
const float* epsilon,
|
||||
const unsigned int len
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Max reduction kernel
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user