Solved by milost in post #10 
              
              
                Like I said it is due to a stupid programming mistake. Since I am assigning the weights to the variables before and after I am accessing the same object using a reference. So both weight matrices are exactly the same. So logically if I subtract them from another the result will always be zero. What …