multi-class-text-classification-cnn-rnn icon indicating copy to clipboard operation
multi-class-text-classification-cnn-rnn copied to clipboard

os.rename can not found model-2600

Open aloyschen opened this issue 8 years ago • 1 comments

I didn't change any file Traceback (most recent call last): File "train.py", line 161, in train_cnn_rnn() File "train.py", line 151, in train_cnn_rnn os.rename(path, trained_dir + 'best_model.ckpt') FileNotFoundError: [Errno 2] No such file or directory: './checkpoints_1504000981/model-2600' -> './trained_results_1504000981/best_model.ckpt'

aloyschen avatar Aug 29 '17 11:08 aloyschen

I have changed the code as follow, delete the rename: logging.critical('Training is complete, testing the best model on x_test and y_test') saver.save(sess, trained_dir + 'best_model.ckpt') saver.restore(sess, checkpoint_prefix + '-' + str(best_at_step))

aloyschen avatar Aug 29 '17 15:08 aloyschen