Hello there,
May i know what does the below message or error means

Your result differs with the reference solution for more than allowed 0.1 tolerance. Please try again!

Please find below my submitted code:

" xs = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0], dtype=float)
ys = np.array([50.0,150.0,200.0,250.0,300.0,350.0,400.0], dtype=float)
model = keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])])
model.compile(optimizer=‘sgd’, loss=‘mean_squared_error’)
model.fit(xs, ys, epochs=500)
return model.predict(y_new)[0]


Hi @Abdulwahab_Bullaleh,

A couple of suggestions here:

  • Scale prices down. Divide prices by 100, i.e. [0.5, 1…5,…,4.0]. That makes model converge better.
  • Increase the number of epochs. This model is pretty lean, so you can increase epochs to improve result.

Hope it helps

Thanks German and it worked.