add seed param for training and keep track of logprob of last iteration