Tensorflow issue google colab : module 'tensorflow._api.v1.compat.v2' has no attribute 'internal' I am running a MASK RCNN model on google colab With tensorflow 1.15 and keras 2.1.6 every thing work correctly but Today, I got this error: enter image description here
For the benefit of community providing solution here though it is presented in Github.
Recently colab was upgraded to TF 2.5.0, forcing an upgrade to keras-nightly 2.5.0.dev2021032900.
The recent change affecting you is the install of keras-nightly, which is incompatible with !pip install of non-nightly keras. Adding !pip uninstall keras-nightly before import keras makes the error go away.
From comments
!pip uninstall keras-nightly !pip uninstall -y tensorflow !pip install h5py==2.10.0Followed by fresh installation of tensorflow and keras as per requirement has solved the problem (paraphrased from nada belhadjslimen)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With