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.0
Followed by fresh installation of tensorflow and keras as per requirement has solved the problem (paraphrased from nada belhadjslimen)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.