-
Notifications
You must be signed in to change notification settings - Fork 32
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
ImportError: cannot import name 'Sequence' from 'keras.utils' (/usr/local/lib/python3.7/dist-packages/keras/utils/__init__.py) #46
Comments
It seems that keras-video-generators do not support tensorflow> 2.x, google colab always has the latest stable version of tensorflow installed. You need to specify the desired tensroflow version on your notebook, i.e. and then: |
Yes. I need to find time to fix this package but I'm very busy for months.
Really sorry, I will try to find some times today and this week to fix
everything.
Le sam. 12 juin 2021 à 12:38, Atzon ***@***.***> a écrit :
… It seems that keras-video-generators do not support tensorflow> 2.x,
google colab always has the latest stable version of tensorflow installed.
You need to specify the desired tensroflow version on your notebook, i.e.
%tensorflow_version 1.x
and then:
import tensorflow print(tensorflow.__version__)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#46 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAYN4H3BM5QQQA7LZI553LTSM2J5ANCNFSM46GU4XAQ>
.
|
That's weird, I use it with TF v2... |
can we solve it by cloning the repository and changing the import statement to |
This worked for me using the Google collab. After printing out the tensorflow version and seein git is 2.5 I opened I replaced line 18 |
I will fix it, sorry for the very high delay, I had too many things ... |
1.1 releases supports now tensorflow >=2.5 see #46
It's now theorically OK for Tensorflow 2.5. I will package a new version as soon as I finish to cleanup the source code to respect better formating, less complexity and so on. |
I saw in the readme the new version v1.1.0, but no tags added. |
I will add the new tag and make a release today. |
I was still getting this error even after the lines were changed. I copied the keras_videos folder in my working directory and this error was resolved. |
ImportError: cannot import name 'Sequence' from 'keras.utils' (/usr/local/lib/python3.7/dist-packages/keras/utils/init.py) ImportError: cannot import name 'Sequence' from 'keras.utils' (/usr/local/lib/python3.7/dist-packages/keras/utils/init.py) ImportError: cannot import name 'Sequence' from 'keras.utils' (/usr/local/lib/python3.7/dist-packages/keras/utils/init.py) |
ImportError: cannot import name 'Sequence' from 'keras.utils' (/usr/local/lib/python3.7/dist-packages/keras/utils/init.py) |
Hi, i've read to all the code and i think there's no problem with the code but
python3 setup.py sdist python3 setup.py install after that try to import it again, it will works. or you just need to download source code from here https://github.com/metal3d/keras-video-generators/raw/master/src/keras_video/generator.py if you want just and then use it like below, it's works as well from generator import VideoFrameGenerator hi sir @metal3d please update the package on pypi with the newest code base |
Thank you!!! It worked for me |
System Information
python -version
): 3.7.10pip freeze | grep keras-video-generators
): 1.0.14Describe the bug
A clear and concise description of what the bug is. Please provide the the error output with the traceback and if possible a little code snippet to reproduce the error)
Error when importing Sequence. This must be something new of Colab/ keras, or an inconsistency between tensorflow.keras and keras. Since
from tensorflow.keras.utils import Sequence
would not throw this error.The text was updated successfully, but these errors were encountered: