To test a nonlinear sequential model using Keras, I made some random data x1,x2,x3 and y = a + b*x1 + c*x2^2 + d*x3^3 + e (a,b,c,d,e are constants). Loss is get
y = a + b*x1 + c*x2^2 + d*x3^3 + e