memory management finished with CUDA version... fully fuctions as long as all the training/test data fits in memory... will fix to handle larger examples in future versions