supports training with random model by random indexes