model = tf.keras.models.Sequential
解决方法:
将model=tf.keras.models.Sequential()替换成model=tf.python.keras.models.Sequential(),成功执行
model = tf.python.keras.models.Sequential
因为:
# find ./envs/mydlenv/ -name keras
./envs/mydlenv/lib/python3.8/site-packages/tensorflow/python/keras
./envs/mydlenv/lib/python3.8/site-packages/tensorflow/python/keras/api/_v2/keras
./envs/mydlenv/lib/python3.8/site-packages/tensorflow/python/keras/api/_v1/keras
./envs/mydlenv/lib/python3.8/site-packages/tensorflow/python/keras/api/keras
./envs/mydlenv/lib/python3.8/site-packages/tensorflow/keras
./envs/mydlenv/lib/python3.8/site-packages/keras
https://blog.csdn.net/aioy123456/article/details/99306439
https://blog.csdn.net/yunfeather/article/details/106463327
标签:mydlenv,lib,no,envs,attribute,keras,site,tensorflow From: https://www.cnblogs.com/emanlee/p/17077341.html