Below the code
import numpy as np np.random.seed(0) from sklearn import datasets import matplotlib.pyplot as plt %matplotlib inline %config Inlin
you need to update the version of your TensorFlow. For me, 2.2.0 solved the problem. I also checked with the higher versions and worked ok.
pip install tensorflow==2.2.0
or
pip install tensorflow-gpu==2.2.0