26template<
typename AFloat>
42template<
typename AFloat>
59template<
typename AFloat>
75template<
typename AFloat>
static AFloat GetDeviceReturn()
Transfer the value in the device return buffer to the host.
cudaStream_t GetComputeStream() const
static AFloat * GetDeviceReturnPointer()
Return device pointer to the device return buffer.
static void ResetDeviceReturn(AFloat value=0.0)
Set the return buffer on the device to the specified value.
const AFloat * GetDataPointer() const
static Scalar_t L1Regularization(const Matrix_t &W)
static void AddL2RegularizationGradients(Matrix_t &A, const Matrix_t &W, Scalar_t weightDecay)
static Scalar_t L2Regularization(const Matrix_t &W)
static void AddL1RegularizationGradients(Matrix_t &A, const Matrix_t &W, Scalar_t weightDecay)
static dim3 BlockDims2D()
static dim3 GridDims2D(int nrows, int ncols)
__global__ void AddL1RegularizationGradients(AFloat *A, const AFloat *B, AFloat weightDecay, int m, int n)
__global__ void AbsoluteSum(AFloat *result, const AFloat *A, int m, int n)
__global__ void AddL2RegularizationGradients(AFloat *A, const AFloat *B, AFloat weightDecay, int m, int n)
__global__ void SquaredSum(AFloat *result, const AFloat *A, int m, int n)
double weightDecay(double error, ItWeight itWeight, ItWeight itWeightEnd, double factorWeightDecay, EnumRegularization eRegularization)
compute the weight decay for regularization (L1 or L2)
create variable transformations