-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use lycon and TensorFlow in same project #3
Comments
These attributes (upper/lower frequency limit) are part of some WIP tensorflow audio operations (tensorflow/tensorflow#11339), so this might be an actual bug, but then I'm wondering why these ops are being loaded when importing lycon, and not when not importing lycon. |
I am having the same issue. As a workaround until it gets fixed, you can use
You can also create wrapper functions for each of the An example wrapper function for
|
I am having this issue as well on Python 2.7. Weird that it works if TensorFlow is imported before Lycon. import tensorflow as tf
import lycon
x = tf.placeholder(tf.float32) # works A better workaround then would be something like: def myFunc():
import tensorflow as tf
import lycon
# do something with lycon
lycon.someLyconFunction() |
Oddly, I can't seem to reproduce it. I tested on Ubuntu 14.04 with both Python 2 and 3. Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul 2 2016, 17:53:06)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lycon
>>> import tensorflow as tf
>>> x = tf.placeholder(tf.float32)
>>> tf.Session().run(tf.reduce_sum(x), feed_dict={x:lycon.load('/tmp/test.png')})
13158753.0
>>> 'Tensorflow version is {}. Lycon version is {}'.format(tf.VERSION, lycon.__version__)
'Tensorflow version is 1.3.0. Lycon version is 0.1.9' Similarly, no issues on macOS 10.13. Python 3.6.1 |Anaconda 4.4.0 (x86_64)| (default, May 11 2017, 13:04:09)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import lycon
>>> import tensorflow as tf
>>> x = tf.placeholder(tf.float32)
>>> tf.Session().run(tf.reduce_sum(x), feed_dict={x:lycon.load('/tmp/test.png')})
13158753.0
>>> 'Tensorflow version is {}. Lycon version is {}'.format(tf.VERSION, lycon.__version__)
'Tensorflow version is 1.3.0. Lycon version is 0.1.9' |
I tried it on another machine with the same result, this time with Tensorflow without GPU support. Both machines are on Ubuntu 16.04, so maybe that's related. I have a 14.04 installation at home, I could try it later today to see if the OS version is the culprit. |
Just wanted to add that I ran into an identical error message, except instead of the lycon module it happens to me with the psi4 module. Similarly if tensorflow is imported before psi4 then the issue does not occur. Running Ubuntu 16.04 with python 3.6 from the latest miniconda. Tried with tensorflow installed from conda-forge and from pip with the tfBinaryURL as provided on tensorflow's own website. Seems like this is likely a bug with tensorflow. I'll look around for an issue on the tensorflow github for something similar and if I don't see one I'll open an issue there. |
Hello,
I'm trying to use lycon in a project to rescale images before feeding them into TensorFlow. However, when importing both lycon and TensorFlow in a python application, TensorFlow crashes.
Running this code results in the following error
Note I'm not trying to say lycon is at fault here, it might very well be a bug in TensorFlow, but I really don't know where to start. I'm using python 3.5 and the latest version of TensorFlow (1.3.0) and lycon, both installed through pip3. I was hoping you might have a clue what's going on here.
Thanks in advance
The text was updated successfully, but these errors were encountered: