import tensorflow as tf
import numpy as np
x = np.array([-1.0, 0.0, 1.0, 2.0, 3.0, 4.0])
y = np.array([-3.0, -1.0, 1.0, 3.0, 5.0, 7.0])
model = tf.keras.Sequential()
model.add(tf.keras.layers.Dense(units=1, input_shape=[1]))
model.summary()
model.compile(optimizer='sgd', loss='mean_squared_error')
model.fit(x, y, epochs=500)
values = np.array([10.0])
predictions = model.predict(values)
print(predictions)