RecursionError: maximum recursion depth exceeded in comparison和ModuleNotFoundError: No module named ‘keras.api‘; ‘keras‘ is not a package两个错误的原因:是tensorflow语法变化。
tensorflow2.10.0以前:
import tensorflow as tf
tf.keras.Sequential()
tensorflow2.10.0以后:
import tensorflow.python.keras as keras
keras.Sequential()