implement multithreaded training for different random inits