How to calculate perplexity of RNN in tensorflow
问题 I'm running the word RNN implmentation of tensor flow of Word RNN How to calculate the perplexity of RNN. Following is the code in training that shows training loss and other things in each epoch: for e in range(model.epoch_pointer.eval(), args.num_epochs): sess.run(tf.assign(model.lr, args.learning_rate * (args.decay_rate ** e))) data_loader.reset_batch_pointer() state = sess.run(model.initial_state) speed = 0 if args.init_from is None: assign_op = model.batch_pointer.assign(0) sess.run