liuliu / ccv

C-based/Cached/Core Computer Vision Library, A Modern Computer Vision Library
http://libccv.org
Other
7.07k stars 1.71k forks source link

layer norm backward #249

Closed weiyanlin117 closed 1 year ago

weiyanlin117 commented 1 year ago

Implement with added tests. Aligned with layer_norm_cpu_ref.c variable name Compare to Pytorch implementation, removed redundant computation(reuse) for ahp[x] = (ap1[x] - meanp2[0]) * inv_stdp2[0];

Screenshot 2023-08-01 at 12 27 51 PM