Added basic training behavior to "diag".
Starting to fix neural nets.