#include #include #include #include typedef float value_type; typedef unsigned long index_type; static value_type F(value_type v) { return 1.0/(1.0 + exp(-v)); } static value_type DF(value_type v) { const value_type Ev = exp(-v); return Ev/((1.0 + Ev)*(1.0 + Ev)); } #ifndef WITH_BLAS static void get_Yp(const value_type * __restrict__ Ap, const value_type * __restrict__ W, value_type * __restrict__ Yp, const value_type * __restrict__ Dp, const index_type height, const index_type width) { for (index_type i=0;i0;k--) { for (index_type i=0;i0;k--) { cblas_sgemv(CblasRowMajor, CblasTrans, width, width, 1, W+k*width*width, width, Yp+(k+1)*width, 1, 0, Yp+k*width, 1); for (index_type i=0;i