import tensorflow as tfimport numpy as npfrom tensorflow.keras.models import Sequentialmodel = tf.keras.Sequential([tf.keras.layers.Dense(units=1, input_shape=[1])])model.compile(optimizer='sgd', loss='mean_squared_error')xs = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], dtype=float)ys = np.array([1.0, 1.5, 2.0, 2.5, 3.0, 3.5], dtype=float)model.fit(xs, ys, epochs=20)print(model.predict([7.0]))#这段代码运行正常,但是如果注释掉第4行,报错ModuleNotFoundError: No module named 'keras',#并且第6行tf.keras.Sequential和tf.keras.models.Sequential都能正常工作