Commit 49314c12 authored by Adrià Arrufat's avatar Adrià Arrufat Committed by Davis E. King
Browse files

Use CUDA in LayerNorm gradient computation

I don't know how I could miss this.
parent 3a267db5
......@@ -687,7 +687,11 @@ namespace dlib { namespace tt
tensor& beta_grad
)
{
#ifdef DLIB_USE_CUDA
cuda::layer_normalize_gradient(eps, gradient_input, means, invstds, src, gamma, src_grad, gamma_grad, beta_grad);
#else
cpu::layer_normalize_gradient(eps, gradient_input, means, invstds, src, gamma, src_grad, gamma_grad, beta_grad);
#endif
}
// ----------------------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment