Thanks for anyone looking at this question but it's been resolved, the error was due to incompatibility between TensorFlow 2.4 and NumPy 1.20, downgrading NumPy to 1.19.5 fixed this issue.
This is because your numpy version 1.20., try to install numpy version of 1.19.5 by using the command conda install numpy==1.19.5 and then excute this.
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.