title: tf.keras giving nan loss and non validation error
body: <p>I'm trying to program Deep neural Network using tf.keras API, I feel my model is right I have removed all the nan values but I'm still getting NAN values during training.
  The Data set I have been using is Wiscon Cancer dataset from UCI <a href="https://archive.ics.uci.edu/ml/datasets/Breast+Cancer+Wisconsin+(Diagnostic)" rel="nofollow noreferrer">here</a></p>
  
  <p>My Code:</p>
  
  <pre><code>from tensorflow import keras
  import pandas as pd
  import tensorflow as tf
  
  df = pd.read_csv('breastc.csv.csv')
  df.dropna()
  id_ = df['ID'].tolist()
  del df['ID']
  labels = df['Class'].tolist()
  import numpy as np
  del df['Class']
  column_list='Compactness'
  df[column_list] = df[column_list].apply(pd.to_numeric, errors='coerce')
  
  model = keras.Sequential()
  model.add(keras.layers.Dense(64,activation='relu',input_shape = (9,)))
  model.add(keras.layers.Dense(64,activation='relu'))
  model.add(keras.layers.Dense(1,activation='softmax'))
  
  model.summary()
  
  X=df.iloc[:].values
  
  model.compile(optimizer=tf.train.AdamOptimizer(0.01),
                loss='mse',       # mean squared error
                metrics=['mae'])
  model.fit(X,labels,batch_size=32,epochs=10,validation_split=0.2)
  </code></pre>
  
  <p>After the fit statement I'm getting the following results</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Train on 559 samples, validate on 140 samples
  Epoch 1/10
  559/559 [==============================] - 0s 599us/step - loss: nan - mean_absolute_error: nan - val_loss: nan - val_mean_absolute_error: nan
  Epoch 2/10
  559/559 [==============================] - 0s 82us/step - loss: nan - mean_absolute_error: nan - val_loss: nan - val_mean_absolute_error: nan
  Epoch 3/10
  559/559 [==============================] - 0s 86us/step - loss: nan - mean_absolute_error: nan - val_loss: nan - val_mean_absolute_error: nan
  Epoch 4/10
  559/559 [==============================] - 0s 84us/step - loss: nan - mean_absolute_error: nan - val_loss: nan - val_mean_absolute_error: nan
  Epoch 5/10
  559/559 [==============================] - 0s 87us/step - loss: nan - mean_absolute_error: nan - val_loss: nan - val_mean_absolute_error: nan
  Epoch 6/10
  559/559 [==============================] - 0s 83us/step - loss: nan - mean_absolute_error: nan - val_loss: nan - val_mean_absolute_error: nan
  Epoch 7/10
  559/559 [==============================] - 0s 80us/step - loss: nan - mean_absolute_error: nan - val_loss: nan - val_mean_absolute_error: nan
  Epoch 8/10
  559/559 [==============================] - 0s 77us/step - loss: nan - mean_absolute_error: nan - val_loss: nan - val_mean_absolute_error: nan
  Epoch 9/10
  559/559 [==============================] - 0s 73us/step - loss: nan - mean_absolute_error: nan - val_loss: nan - val_mean_absolute_error: nan
  Epoch 10/10
  559/559 [==============================] - 0s 62us/step - loss: nan - mean_absolute_error: nan - val_loss: nan - val_mean_absolute_error: nan
  &lt;tensorflow.python.keras._impl.keras.callbacks.History at 0x15c94a80cc0&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>As we can see there is no training happening.
  Please guide me.</p>
  
  <p>Yours Sincerely,
  Vidit Shah</p>