tensorflow-speech-recognition icon indicating copy to clipboard operation
tensorflow-speech-recognition copied to clipboard

tflearn error: No variables to save

Open YichiHuang opened this issue 7 years ago • 15 comments

Hi, I download the speech_data.py and speaker_classifier_tflearn.py. When I run the speaker_classifier_tflearn.py, I got errors as follows: Traceback (most recent call last): File "speaker_classifier_tflearn.py", line 28, in <module> model = tflearn.DNN(net) File "/root/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tflearn/models/dnn.py", line 57, in __init__ session=session) File "/root/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tflearn/helpers/trainer.py", line 125, in __init__ keep_checkpoint_every_n_hours=keep_checkpoint_every_n_hours) File "/root/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1000, in __init__ self.build() File "/root/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1021, in build raise ValueError("No variables to save") ValueError: No variables to save

YichiHuang avatar Dec 09 '16 03:12 YichiHuang

I have the same problem using: Debian 9 Tensorflow .12 GPU Python 3.5

Adam-Vandervorst avatar Dec 10 '16 16:12 Adam-Vandervorst

I have the same problem using: Windows 10 Tensorflow .12 Python3.5

anees042 avatar Dec 10 '16 23:12 anees042

strange, maybe a tflearn.py bug? we'll investigate ...

pannous avatar Dec 11 '16 11:12 pannous

We also noted this behaviour when using the bleeding edge of Tensorflow itself as well as tflearn. Trying checking out the last official releases of both, and it should work.

adroit91 avatar Dec 12 '16 09:12 adroit91

I upgraded tensorflow-gpu to 0.12.0rc1 and tflearn to 0.2.2 and this build seems broken. In the tflearn config file:

    _FLOATX = tf.float32
AttributeError: module 'tensorflow' has no attribute 'float32'

EDIT: downgraded tensorflow-gpu to previous build, still raising an error.

  File "/tflearn/summaries.py", line 46, in get_summary
    summ = tf.scalar_summary(tag, value)
AttributeError: module 'tensorflow' has no attribute 'scalar_summary'

Adam-Vandervorst avatar Dec 12 '16 14:12 Adam-Vandervorst

Sorry I can NOT reproduce the error with any version of tensorflow / tflearn :( maybe try pip install git+https://github.com/tflearn/tflearn.git pip3 install git+https://github.com/tflearn/tflearn.git

pannous avatar Dec 14 '16 20:12 pannous

What system setup and tflearn/tensorflow versions are you using? With the latest (git) libs I still get the same error, and I'm sadly not able to find information about it online.

Adam-Vandervorst avatar Dec 14 '16 20:12 Adam-Vandervorst

strange. tried most combinations of py2.7 / py3.5 tf0.11.0 / 0.12.0rc1 tflearn-0.2.2 tflearn-0.1.1(?) mac / ubuntu only getting warnings, no errors

pannous avatar Dec 14 '16 20:12 pannous

at this point it might be easiest if you just patch tflearn/helpers/trainer.py, line 125 manually

pannous avatar Dec 14 '16 20:12 pannous

or file a tflearn bug astonishing how many people here seem to be affected.

or just skip the toy examples and jump straight to ./densenet_layer.py

pannous avatar Dec 14 '16 20:12 pannous

Alright, found it. It was a tensorflow issue, tho I do not know that exactly.

https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-0.12.0rc1-cp35-cp35m-linux_x86_64.whl

(Watch out, download link!) Worked for me, while nor the latest build (git) nor the pip version worked. Thank you, I opened the issue, as like you said, many people are affected.

Adam-Vandervorst avatar Dec 14 '16 20:12 Adam-Vandervorst

https://github.com/tflearn/tflearn/issues/480

is it the same issue?

anees042 avatar Dec 15 '16 18:12 anees042

Correct.

Adam-Vandervorst avatar Dec 15 '16 18:12 Adam-Vandervorst

even downgrading tensorflow to 0.11 solves the problem; https://storage.googleapis.com/tensorflow/linux/cpu/cloudml/tensorflow-0.11.0rc2-cp27-none-linux_x86_64.whl

can't do that on windows :( installing gpu version solves the problem on windows

anees042 avatar Dec 16 '16 00:12 anees042

@pannous is this a complete project?

raffaelbd avatar Mar 03 '19 14:03 raffaelbd