running out of memory when training