No module named contrib.framework.python.ops

1,096 views
Skip to first unread message

Mahmood Naderan

unread,
Oct 11, 2019, 5:01:36 AM10/11/19
to TensorFlow Developers
Hi,
After building TF-2.0 from source, I get the following error when I want to train the speech_commands example

$ python tensorflow/examples/speech_commands/train.py
Traceback (most recent call last):
  File "tensorflow/examples/speech_commands/train.py", line 81, in <module>
    import input_data
  File "/opt/cactus/tf/tensorflow-2.0.0/tensorflow/examples/speech_commands/input_data.py", line 35, in <module>
    from tensorflow.contrib.framework.python.ops import audio_ops as contrib_audio
ImportError: No module named contrib.framework.python.ops


Any idea for fixing that?

Regards,
Mahmood



Martin Wicke

unread,
Oct 11, 2019, 10:42:47 AM10/11/19
to Mahmood Naderan, Mark Daoust, TensorFlow Developers
This example shouldn't even exist any more. 


--
You received this message because you are subscribed to the Google Groups "TensorFlow Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/developers/CADa2P2VFGvG69c0DmKSXxEaAyu3HBp7%3DgEz5ZPTeE5xJpb1SkA%40mail.gmail.com.

Mahmood Naderan

unread,
Oct 11, 2019, 12:31:01 PM10/11/19
to Martin Wicke, Mark Daoust, TensorFlow Developers
I extracted v2.0.0.tar.gz and it is there.
Is there any update on examples?

Regards,
Mahmood




Billy Lamberta

unread,
Oct 14, 2019, 2:48:44 PM10/14/19
to TensorFlow Developers, wi...@google.com, markd...@google.com
Hi Mahmood,

There's a fix pending for the TF Lite examples. Not many changes needed to get it to work:
1. `contrib_audio` => `tf.audio`
2. `tf.contrib.lite.TocoConverter` => `tf.compat.v1.lite.TFLiteConverter`
3. tensorflow>=1.14.0

Cheers.
Billy


> Hi
> Is there any update on the examples compatible with TF2?
> Seems that some of them are outdated.
>
> Regards,
> Mahmood

Reply all
Reply to author
Forward
0 new messages