27template<
typename AFloat>
28AFloat TCudnn<AFloat>::MeanSquaredError(
const TCudaTensor<AFloat> & Y,
29 const TCudaTensor<AFloat> &
output,
30 const TCudaTensor<AFloat> & weights)
36template<
typename AFloat>
37void TCudnn<AFloat>::MeanSquaredErrorGradients(TCudaTensor<AFloat> & dY,
38 const TCudaTensor<AFloat> & Y,
39 const TCudaTensor<AFloat> &
output,
40 const TCudaTensor<AFloat> &weights)
42 TCudaMatrix<AFloat> mdY = dY.GetMatrix();
47template<
typename AFloat>
48AFloat TCudnn<AFloat>::CrossEntropy(
const TCudaTensor<AFloat> & Y,
49 const TCudaTensor<AFloat> &
output,
50 const TCudaTensor<AFloat> &weights)
56template<
typename AFloat>
57void TCudnn<AFloat>::CrossEntropyGradients(TCudaTensor<AFloat> & dY,
58 const TCudaTensor<AFloat> & Y,
59 const TCudaTensor<AFloat> &
output,
60 const TCudaTensor<AFloat> &weights)
62 TCudaMatrix<AFloat> mdY = dY.GetMatrix();
67template<
typename AFloat>
68AFloat TCudnn<AFloat>::SoftmaxCrossEntropy(
const TCudaTensor<AFloat> & Y,
69 const TCudaTensor<AFloat> &
output,
70 const TCudaTensor<AFloat> &weights)
76template<
typename AFloat>
77void TCudnn<AFloat>::SoftmaxCrossEntropyGradients(TCudaTensor<AFloat> & dY,
78 const TCudaTensor<AFloat> & Y,
79 const TCudaTensor<AFloat> &
output,
80 const TCudaTensor<AFloat> &weights)
82 TCudaMatrix<AFloat> mdY = dY.GetMatrix();
static Scalar_t CrossEntropy(const Matrix_t &Y, const Matrix_t &output, const Matrix_t &weights)
Sigmoid transformation is implicitly applied, thus output should hold the linear activations of the l...
static void MeanSquaredErrorGradients(Matrix_t &dY, const Matrix_t &Y, const Matrix_t &output, const Matrix_t &weights)
static Scalar_t MeanSquaredError(const Matrix_t &Y, const Matrix_t &output, const Matrix_t &weights)
static Scalar_t SoftmaxCrossEntropy(const Matrix_t &Y, const Matrix_t &output, const Matrix_t &weights)
Softmax transformation is implicitly applied, thus output should hold the linear activations of the l...
static void CrossEntropyGradients(Matrix_t &dY, const Matrix_t &Y, const Matrix_t &output, const Matrix_t &weights)
static void SoftmaxCrossEntropyGradients(Matrix_t &dY, const Matrix_t &Y, const Matrix_t &output, const Matrix_t &weights)
create variable transformations