0

It keeps on showing this yellow line under every import from Tensorflow in google colaboratory. I wonder why is this happening?

from tensorflow.keras import layers
from tensorflow.keras.layers.experimental import preprocessing
from tensorflow.keras.model import Sequential

enter image description here

ClaudiaR
  • 3,108
  • 2
  • 13
  • 27

1 Answers1

1

I'm experiencing this too. It's a bug in TensorFlow. If you try executing the code everything will work fine, it's just a warning. However, if you want to make the warning go away you can replace all imports that start with tensorflow.keras with keras.api._v2.keras.

In your case:

from keras.api._v2.keras import layers
from keras.api._v2.keras.layers.experimental import preprocessing
from keras.api._v2.keras import Sequential
ClaudiaR
  • 3,108
  • 2
  • 13
  • 27
  • If this solves your issue, please consider accepting the answer by clicking on the check mark on the left side of the answer. – ClaudiaR Sep 17 '22 at 14:11