I am trying to recreate a simple Neural Network from scratch in vanilla C++ (no libraries). However, I need to get the sum of the matrix of size (10 x 42000) with value between -1 and 1 (here is the txt file), np.sum gives me 2.7711166694643907e-12, however c++ gives me -3.08041e-12. This is to calculate the derivative of bias of the NN. I tried pairwise_sum and kahan_sum in c++ and they both give me the same 3.547e-13 result. Using basic + operation gives me -3.08041e-12. Is it really impossible to construct NN with vanilla C++?
Please help me
Lê Thành Đạt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
9