bug in predicting each sample of sentence