anchor-optimization icon indicating copy to clipboard operation
anchor-optimization copied to clipboard

AttributeError: module 'keras.utils' has no attribute 'Sequence'

Open alancarlosml opened this issue 3 years ago • 2 comments

Hi, I'm getting this error messagem when runing:

$ python anchor_optimization\optimize_anchors.py test.csv

Traceback (most recent call last):
  File "E:\anchor-optimization\anchor_optimization\optimize_anchors.py", line 11, in <module>
    from keras_retinanet.preprocessing.csv_generator import _open_for_csv
  File "C:\Users\USER\anaconda3\envs\keras_env\lib\site-packages\keras_retinanet\preprocessing\csv_generator.py", line 18, in <module>
    from .generator import Generator
  File "C:\Users\USER\anaconda3\envs\keras_env\lib\site-packages\keras_retinanet\preprocessing\generator.py", line 39, in <module>
    class Generator(keras.utils.Sequence):
AttributeError: module 'keras.utils' has no attribute 'Sequence'

Tensorflow version: 2.7.0

Any help?

alancarlosml avatar Dec 09 '21 20:12 alancarlosml

Same problem with you

furkanaydgn avatar May 08 '22 10:05 furkanaydgn

Changing Generator(keras.utils.Sequence) to Generator(keras.utils.all_utils.Sequence) should fix this.

kirnh avatar Mar 20 '23 06:03 kirnh