Skip to content
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

Old tensorflow #10

Open
ireneb612 opened this issue Jan 5, 2022 · 3 comments
Open

Old tensorflow #10

ireneb612 opened this issue Jan 5, 2022 · 3 comments

Comments

@ireneb612
Copy link

Hi, the tensorflow version seems to be too old, thus the script doesn't work. on Colab Is there a way you could check how to update the tensorflow version?

@Svito-zar
Copy link
Owner

Dear @ireneb612 , I recommend you using Tensorflow 1.14 to run this demo

@ireneb612
Copy link
Author

@Svito-zar I tried to run everything with tensorflow 1.14, but I git these errors. Now file seams to be created.

8 s
! ./generate.sh data/audio3_20sec.wav
Encoding audio ...
WARNING:root:frame length (2940) is greater than FFT size (512), frame will be truncated. Increase NFFT to avoid.
WARNING:root:frame length (2940) is greater than FFT size (512), frame will be truncated. Increase NFFT to avoid.
Predicting motion encoding ...
Traceback (most recent call last):
File "predict.py", line 8, in
from keras.models import load_model
File "/usr/local/lib/python3.7/dist-packages/keras/init.py", line 25, in
from keras import models
File "/usr/local/lib/python3.7/dist-packages/keras/models.py", line 19, in
from keras import backend
File "/usr/local/lib/python3.7/dist-packages/keras/backend.py", line 39, in
from tensorflow.python.eager.context import get_config
ImportError: cannot import name 'get_config' from 'tensorflow.python.eager.context' (/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/context.py)
Decoding motion ...
2022-01-10 16:37:30.507622: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2022-01-10 16:37:30.510919: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz
2022-01-10 16:37:30.511140: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x56429d58d180 executing computations on platform Host. Devices:
2022-01-10 16:37:30.511177: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): ,

DAE with the following shape was created : [138, 112, 138]
2022-01-10 16:37:30.594192: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set. If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU. To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
Initializing variables ...

Model restored from the file models/DAE_checkpoints/chkpt-final.
Traceback (most recent call last):
File "decode_motion.py", line 380, in
encoding = np.loadtxt(args.encoding_file)
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/npyio.py", line 955, in loadtxt
fh = np.lib._datasource.open(fname, 'rt', encoding=encoding)
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/_datasource.py", line 266, in open
return ds.open(path, mode, encoding=encoding, newline=newline)
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/_datasource.py", line 623, in open
raise IOError("%s not found." % path)
OSError: data/encoded_motion.txt not found.
Creating a video with this motion and audio ...
Traceback (most recent call last):
File "visualization/model_animator.py", line 207, in
main()
File "visualization/model_animator.py", line 195, in main
ml = ModelSkeletons(args.input, args.start, args.end)
File "visualization/model_animator.py", line 17, in init
skeletons = np.loadtxt(data_path)
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/npyio.py", line 955, in loadtxt
fh = np.lib._datasource.open(fname, 'rt', encoding=encoding)
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/_datasource.py", line 266, in open
return ds.open(path, mode, encoding=encoding, newline=newline)
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/_datasource.py", line 623, in open
raise IOError("%s not found." % path)
OSError: result/gestures.txt not found.
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
data/temp_gesture_video.mp4: No such file or directory
The gestures 3D coordinates were written in the file 'result/gestures.txt'
The video with the produced gestures was written in the file 'result/Gesture_Video.mp4'

@Svito-zar
Copy link
Owner

Thank you for the info, @ireneb612 .
It seem that the issue is in the incompatibility between Tensorflow and Keras versions: from tensorflow.python.eager.context import get_config ImportError: cannot import name 'get_config' from 'tensorflow.python.eager.context'
These StackOverFlow issues seems to be the same one as you are facing:
https://stackoverflow.com/questions/66964492/importerror-cannot-import-name-get-config-from-tensorflow-python-eager-conte
https://stackoverflow.com/questions/69250228/importerror-cannot-import-name-get-config-from-tensorflow-python-eager-conte
I hope you can find the solution there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants