tensorflow: [Windows] Speech commands tutorial does not work

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No, I’m running python tensorflow/examples/speech_commands/train.py
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 7 x64
  • TensorFlow installed from (source or binary): pip install tf-nightly (tf_nightly-1.5.0.dev20171026-cp35-cp35m-win_amd64.whl)
  • TensorFlow version (use command below): b’unknown’ 1.5.0-dev20171026
  • Python version: Python 3.5.4
  • Bazel version (if compiling from source): N/A
  • CUDA/cuDNN version: CUDA 8.0, cuDNN 6.1 x64
  • GPU model and memory: 2x Nvidia GTX 670 2GB
  • Exact command to reproduce: python tensorflow/examples/speech_commands/train.py

Describe the problem

It appears that the currently nightlies (or 1.4.0rc1) do not contain the gen_audio_ops module. However the documentation for r1.4 or master (https://www.tensorflow.org/versions/r1.4/tutorials/audio_recognition or https://www.tensorflow.org/versions/master/tutorials/audio_recognition) appears to indicate that the speech_commands demo should work.

Related: #13031

Source code / logs

Traceback (most recent call last):
  File "tensorflow/examples/speech_commands/train.py", line 81, in <module>
    import input_data
  File "E:\Tom\Documents\GIT\tensorflow\tensorflow\examples\speech_commands\input_data.py", line 35, in <module>
    from tensorflow.contrib.framework.python.ops import audio_ops as contrib_audio
  File "C:\Users\Tom\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\contrib\framework\python\ops\audio_ops.py", line 31, in <module>
    from tensorflow.python.ops.gen_audio_ops import *
ImportError: No module named 'tensorflow.python.ops.gen_audio_ops'

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 2
  • Comments: 21 (10 by maintainers)

Commits related to this issue

Most upvoted comments

@NearLinHere The Wheel filename includes 20171026, which suggests that it’s the nightly build from October 26th 2017. Can you try against with the latest nightly build?

@mrry thanks for your reply. I changed my tensor flow version to a newer version tf_nightly. This solve my problem, but now I have another one.

PS C:\Python36\lib\site-packages> python tensorflow\examples\speech_commands\train.py 2017-11-11 16:59:17.282443: I C:\tf_jenkins\home\workspace\tf-nightly-windows\M\windows\PY\36\tensorflow\core\platform\cpu _feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2 Traceback (most recent call last): File “tensorflow\examples\speech_commands\train.py”, line 429, in <module> tf.app.run(main=main, argv=[sys.argv[0]] + unparsed) File “C:\Python36\lib\site-packages\tensorflow\python\platform\app.py”, line 133, in run _sys.exit(main(argv)) File “tensorflow\examples\speech_commands\train.py”, line 106, in main FLAGS.testing_percentage, model_settings) File “C:\Python36\lib\site-packages\tensorflow\examples\speech_commands\input_data.py”, line 161, in init testing_percentage) File “C:\Python36\lib\site-packages\tensorflow\examples\speech_commands\input_data.py”, line 243, in prepare_data_index word = re.search(‘./([^/]+)/..wav’, wav_path).group(1).lower() AttributeError: ‘NoneType’ object has no attribute ‘group’

I have the same problem. The code is pull 5 hours ago.

System information Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No, I’m running python tensorflow/examples/speech_commands/train.py OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 x64 TensorFlow installed from (source or binary): pip install tf-nightly (tf_nightly-1.5.0.dev20171026-cp35-cp35m-win_amd64.whl) TensorFlow version (use command below): b’unknown’ 1.5.0-dev20171104 Python version: Python 3.6.3 Bazel version (if compiling from source): N/A CUDA/cuDNN version: CUDA 8.0, cuDNN 6.0 GPU model and memory: Nvidia GTX 960M , 8GB Exact command to reproduce: python tensorflow/examples/speech_commands/train.py

Thanks for letting us know. It looks like that code is relying on '/' being the path separator. I’ve just sent PR #14519 that should fix this.

@KevlarTheGreat Which version of TensorFlow have you installed? The fix is only available in the tf-nightly package, and will be part of TF 1.5.