Solved by MadmanNero in post #11 
              
              
                Thanks tom for your reply. The learning rate was indeed set to 1.0 which is a bit high I guess but maybe not yet rediculous. Switching the learning rate back to 0.01 alone is not enough as it seems because I’m still getting my nans then. 
While I have still trouble getting a proper standard deviatio…