Setup to train, still a bug to be fixed