Thank you for your response.
The data was created using a linearized model of a system. Generally for higher values of M i.e. M = 8,9 or 10 (could also be continuous values like 8.8, 10.2, 9.7) the curve gets really close. Since the signals are measured, they already contain some noise (assumed to be gaussian).
For now with 150 epochs of training, I am getting an accuracy of about 96% which seems good I guess. The model does not overfit with higher epochs. i believe, the problem is solved for now. Thank you for your suggestions and tips (specially the observation of log (loss) for small values of losses) . This will come in very handy for my future works.