pannous / tensorflow-speech-recognition

🎙Speech recognition using the tensorflow deep learning framework, sequence-to-sequence neural networks
Other
2.16k stars 639 forks source link

tflearn error: No variables to save #19

Open YichiHuang opened 7 years ago

YichiHuang commented 7 years ago

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

Adam-Vandervorst commented 7 years ago

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

anees042 commented 7 years ago

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

pannous commented 7 years ago

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

adroit91 commented 7 years ago

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.

Adam-Vandervorst commented 7 years ago

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'
pannous commented 7 years ago

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

Adam-Vandervorst commented 7 years ago

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.

pannous commented 7 years ago

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 commented 7 years ago

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

pannous commented 7 years ago

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

Adam-Vandervorst commented 7 years ago

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.

anees042 commented 7 years ago

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

is it the same issue?

Adam-Vandervorst commented 7 years ago

Correct.

anees042 commented 7 years ago

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

raffaelbd commented 5 years ago

@pannous is this a complete project?