for start, end in zip(range(0, number_of_training_data, batch_size),range(batch_size, number_of_training_data, batch_size)):
if epoch==0 and counter==0:
print("trainX[start:end]:",trainX[start:end]) /ǘd-array. each element slength is a 100.
print("trainY[start:end]:",trainY[start:end]) //a list,each element is a list.element:may be has 1,2,3,4,5 labels.
//print("trainY1999[start:end]:",trainY1999[start:end])
train_Y_batch=process_labels(trainY[start:end])
curr_loss,_=sess.run([fast_text.loss_val,fast_text.train_op],feed_dict={fast_text.sentence:trainX[start:end],
After Change
print("Epoch %d Validation Loss:%.3f\tValidation Accuracy: %.3f" % (epoch,eval_loss,eval_accuracy)) //,\tValidation Accuracy: %.3f--->eval_acc
//save model to checkpoint
print("Going to save checkpoint.")
save_path=FLAGS.ckpt_dir+"model.ckpt"saver.save(sess,save_path,global_step=epoch) //fast_text.epoch_step
// 5.最后在测试集上做测试,并报告测试准确率 Test
test_loss, test_acc = do_eval(sess, fast_text, testX, testY,batch_size,index2label) //testY1999