Fix for Training

Now with and without *.mat files, training functioning properly.