check_weights function

Check to see if weights are optimized correctly