title: Keras neural network model accuracy is always zero
body: <p>My name is Sabber. My research interests are in computational geophysics. Recently I have started working on a deep-learning application to geophysics. Part of this work I have played with some toy examples (spiral data) using both "Tensorflow" and "Keras." With some trial and error, I was able to get 97% accuracy. BTW, All the problems are the regression.</p>
  
  <p>In this work, I want to predict any of the stress component based on some physical parameters (temperature, density, p-wave, s-wave velocity, thermal energy, and depth). </p>
  
  <p>However, when I use the actual geophysical data, I got zero accuracies from the first epoch. I do not have any clue right now what made the accuracy zero. I have spent many hours to learn if I had made any mistake. I am a little bit frustrated since I could not figure out the problem. There might have a couple of options to dig: </p>
  
  <ul>
  <li>Either my data has nothing to learn or </li>
  <li>Data pre-processing is wrong.</li>
  </ul>
  
  <p>At this stage, I feel I desperately need some help. For your convenience, I have Included: </p>
  
  <ol>
  <li>Code ("Tensorflow" and "Keras" ):
  <a href="https://github.com/msahamed/deep_learning_stress_model" rel="nofollow noreferrer">https://github.com/msahamed/deep_learning_stress_model</a></li>
  </ol>
  
  <p>This repository has three files. Out of these three "ipynb" you can look at either "predict_stress_keras.ipynb" or "predict_stress_tensorflow.ipynb". The code is very straightforward. I have written all the necessary comments. </p>
  
  <ol start="2">
  <li>Data: <a href="https://drive.google.com/open?id=0BwexgJqQoeJUVlVPUkhtT210MlE" rel="nofollow noreferrer">https://drive.google.com/open?id=0BwexgJqQoeJUVlVPUkhtT210MlE</a></li>
  </ol>
  
  <p>The data file has no any header and has 11 columns. The X can be first seven columns. We do not need x coordinate (8 column). This column can be ignored. Based on X we want to predict any of the stress components (xx/xz/zz).</p>
  
  <p>Update:
  Even if ignore the accuracy for this regression problem, all the predicted results are same(see Figure)</p>
  
  <p><a href="https://i.stack.imgur.com/Yb3nD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Yb3nD.png" alt="Accuracy and loss of the model"></a></p>
  
  <p><a href="https://i.stack.imgur.com/jODsQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jODsQ.png" alt="Test and predicted data"></a></p>
  
  <p>Please give me some feedback. I appreciate your help.</p>