Training a TensorFlow model on sparse data with standard MSE loss can cause it to predict only zeros. To solve this, you need a custom loss function that focuses solely on the non-zero values in the target tensor. This approach prevents the loss from being distorted by the abundant zeros and ensure the model accurately learns from the actual sensor measurements. Please refer this gist, where i have tried implementing a custom loss function.