Hi, This is abdullah.
The above error is frequently occur in colab due to the default Keras version and you can fixed it by installing specific version.
To solve it you need to create a new cell and perform below operation or steps.
!pip uninstall keras
!pip install keras==2.2.4
and the restart your runtime from starting. It work for me.
Still if you have any problem you can post here.