Validation for weight derivatives, refactoring

In Matlab weights are randomized only at generation.