0

I want to import " balanced_batch_generator" by below code. but it gives an error as below. I was wonder if someone helps me

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

from imblearn.keras import balanced_batch_generator
afrah
  • 31
  • 8
  • Does [this](https://stackoverflow.com/a/67724133/14290681) answer your question? –  Aug 11 '21 at 02:07

1 Answers1

1

Since Keras is now integrated into 2.x versions of Tensorflow, you might try this:

Replace

from imblearn.keras import balanced_batch_generator

with

from imblearn.tensorflow import balanced_batch_generator