diff options
Diffstat (limited to 'lib/THCUNN/GatedLinearUnit.cu')
-rw-r--r-- | lib/THCUNN/GatedLinearUnit.cu | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/THCUNN/GatedLinearUnit.cu b/lib/THCUNN/GatedLinearUnit.cu deleted file mode 100644 index d9f3471..0000000 --- a/lib/THCUNN/GatedLinearUnit.cu +++ /dev/null @@ -1,29 +0,0 @@ -#include "THCUNN.h" -#include "THCHalf.h" -#include "THCHalfAutoNumerics.cuh" -#include "common.h" - -template <typename Dtype, typename Acctype> -struct gatedLinearCSigMul_functor -{ - __device__ void operator()(Dtype *target, const Dtype *sigTensor, const Dtype *mulTensor) const - { - const Acctype sigNum = Acctype(1)/(Acctype(1)+ exp(ScalarConvert<Dtype, Acctype>::to(-*sigTensor))); - const Dtype mulNum = *mulTensor; - *target = ScalarConvert<Acctype, Dtype>::to(sigNum * mulNum); - } -}; - -template <typename Dtype, typename Acctype> -struct gatedLinearDerivativeSecondHalf_functor -{ - __device__ void operator()(Dtype *target, const Dtype *sigTensor, const Dtype *mulTensor) const - { - const Acctype sigNum = Acctype(1)/(Acctype(1)+ exp(ScalarConvert<Dtype, Acctype>::to(-*sigTensor))); - const Dtype mulNum = *mulTensor; - *target *= ScalarConvert<Acctype, Dtype>::to((Acctype(1) - sigNum) * sigNum * mulNum); - } -}; - -#include "generic/GatedLinearUnit.cu" -#include "THCGenerateFloatTypes.h"
\ No newline at end of file |