GithubHelp home page GithubHelp logo

Comments (11)

jiegzhan avatar jiegzhan commented on August 22, 2024

Did you check the saved model directory? Looks like model-2700 doesn't exist.

os.rename(path, trained_dir + 'best_model.ckpt')
FileNotFoundError: [Errno 2] No such file or directory: './checkpoints_1486165230/model-2700' -> './trained_results_1486165230/best_model.ckpt'

from multi-class-text-classification-cnn-rnn.

Tomas0413 avatar Tomas0413 commented on August 22, 2024

@jiegzhan yes, model-2700 files do exist. but there is no model-2700 file as such nor it's a directory:

ls -lrt ./checkpoints_1486165230/
total 71404
-rw-r--r-- 1 root root 1433 Feb 3 23:41 model-1600.index
-rw-r--r-- 1 root root 13073080 Feb 3 23:41 model-1600.data-00000-of-00001
-rw-r--r-- 1 root root 1543734 Feb 3 23:41 model-1600.meta
-rw-r--r-- 1 root root 1433 Feb 3 23:41 model-1700.index
-rw-r--r-- 1 root root 13073080 Feb 3 23:41 model-1700.data-00000-of-00001
-rw-r--r-- 1 root root 1543734 Feb 3 23:41 model-1700.meta
-rw-r--r-- 1 root root 1433 Feb 3 23:42 model-2200.index
-rw-r--r-- 1 root root 13073080 Feb 3 23:42 model-2200.data-00000-of-00001
-rw-r--r-- 1 root root 1543734 Feb 3 23:42 model-2200.meta
-rw-r--r-- 1 root root 1433 Feb 3 23:42 model-2400.index
-rw-r--r-- 1 root root 13073080 Feb 3 23:42 model-2400.data-00000-of-00001
-rw-r--r-- 1 root root 1543734 Feb 3 23:42 model-2400.meta
-rw-r--r-- 1 root root 1433 Feb 3 23:42 model-2700.index
-rw-r--r-- 1 root root 13073080 Feb 3 23:42 model-2700.data-00000-of-00001
-rw-r--r-- 1 root root 241 Feb 3 23:42 checkpoint
-rw-r--r-- 1 root root 1543734 Feb 3 23:42 model-2700.meta

I'll have a look if train.py didn't write something correctly or if os.rename command is incorrect.

from multi-class-text-classification-cnn-rnn.

Tomas0413 avatar Tomas0413 commented on August 22, 2024

python3 -c 'import tensorflow as tf; print(tf.version)'
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally
0.12.1

from multi-class-text-classification-cnn-rnn.

jiegzhan avatar jiegzhan commented on August 22, 2024

My tensorflow version is 0.9, it only produce two training files.

-rw-r--r-- 1 root root 1433 Feb 3 23:42 model-2700.index
-rw-r--r-- 1 root root 1543734 Feb 3 23:42 model-2700.meta
-rw-r--r-- 1 root root 13073080 Feb 3 23:42 model-2700.data-00000-of-00001

The newer version has three training files, instead of two.

from multi-class-text-classification-cnn-rnn.

Tomas0413 avatar Tomas0413 commented on August 22, 2024

Do you get more files created in checkpoints directory? I see *.meta, *.index, .data- and checkpoint.

from multi-class-text-classification-cnn-rnn.

jiegzhan avatar jiegzhan commented on August 22, 2024

My tensorflow version is 0.9, it only produces two training files.

from multi-class-text-classification-cnn-rnn.

Tomas0413 avatar Tomas0413 commented on August 22, 2024

Found this:
https://github.com/tensorflow/tensorflow/blob/master/RELEASE.md

New checkpoint format becomes the default in tf.train.Saver. Old V1 checkpoints continue to be readable; controlled by the write_version argument, tf.train.Saver now by default writes out in the new V2 format. It significantly reduces the peak memory required and latency incurred during restore.

from multi-class-text-classification-cnn-rnn.

jiegzhan avatar jiegzhan commented on August 22, 2024

set up the write_version argument if you are in a hurry.

I will try to upgrade the tensorflow and make changes soon.

Thanks for pointing this out.

from multi-class-text-classification-cnn-rnn.

Tomas0413 avatar Tomas0413 commented on August 22, 2024

Yep, testing it with V1 now.

from multi-class-text-classification-cnn-rnn.

Tomas0413 avatar Tomas0413 commented on August 22, 2024

Yep, works fine with :

saver = tf.train.Saver(tf.all_variables(), write_version=tf.train.SaverDef.V1)

This is the how the warning message looks like:

WARNING:tensorflow:*******************************************************
WARNING:tensorflow:*******************************************************
WARNING:tensorflow:TensorFlow's V1 checkpoint format has been deprecated.
WARNING:tensorflow:TensorFlow's V1 checkpoint format has been deprecated.
WARNING:tensorflow:Consider switching to the more efficient V2 format:
WARNING:tensorflow:Consider switching to the more efficient V2 format:
WARNING:tensorflow: tf.train.Saver(write_version=tf.train.SaverDef.V2)
WARNING:tensorflow: tf.train.Saver(write_version=tf.train.SaverDef.V2)
WARNING:tensorflow:now on by default.
WARNING:tensorflow:now on by default.
WARNING:tensorflow:*******************************************************
WARNING:tensorflow:*******************************************************

Thanks

from multi-class-text-classification-cnn-rnn.

 avatar commented on August 22, 2024

Hai Guys
Any Solution for the above issue . If yes please reply.

from multi-class-text-classification-cnn-rnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.