title: None value not supported , Keras LSTM fit
body: <p>Dear all I am using Keras 2.3.1 and Tensorflow 2.0.0 to run the following code:</p>
  
  <pre><code>def lstm_nn_model(
          trainings_data: np.array,
          prediction_data: np.array,
          target_train: np.array,
          learning_rate: float = 0.001,
          lstm_units: int = 100,
          batch_size: int = 72,
          epochs: int = 1000,
          seq_len: float = 4):
      # LSTM part
      lstm_input = Input(batch_shape=trainings_data.shape, dtype='float32',
                         name='lstm_input')
      lstm_out = LSTM(lstm_units, return_sequences=False)(lstm_input)
      # Output
      output = Dense(1, name='output')(lstm_out)
  
      # compile model
      adam_opt = Adam(lr=learning_rate, beta_1=0.9, beta_2=0.999, epsilon=None,
                      decay=0.0, amsgrad=False)
      lstm_model = Model(inputs=lstm_input, outputs=output)
      lstm_model.compile(
          optimizer=adam_opt, loss='mean_squared_error', metrics=['accuracy']
      )
      # Train
      lstm_model.fit(
          x=trainings_data ,
          y=target_train,
          batch_size=batch_size,
          epochs=epochs,
          verbose=2
      )
      return lstm_model.predict(prediction_data)
  </code></pre>
  
  <p>My Data has no NaN's or Nulls. You can download the data I use her <a href="https://share.nuclino.com/p/shared-c2ReL9zRLknyKuNPlEmrtg" rel="nofollow noreferrer">https://share.nuclino.com/p/shared-c2ReL9zRLknyKuNPlEmrtg</a>. There are pickled numpy arrays (numpy version 1.17.1). 
  Actually I do not know why this happens and the similar answers were not helpful. Please let me know If you need help to reproduce the error. Thanks in advance. </p>
  
  <p>The complete error message: </p>
  
  <pre><code>ValueError                                Traceback (most recent call last)
  &lt;ipython-input-6-2930b20ab5e4&gt; in &lt;module&gt;()
        2 target_train_data = target_train[3:]
        3 pred_data = pre_process_lstm_predictors(prediction_data, 3)
  ----&gt; 4 pred_lstm = lstm_nn_model(train_data, pred_data, target_train_data)
  
  ~/Desktop/python_projects/meteoIntelligence-projects/src/dataScience/modellingServices.py in lstm_nn_model(trainings_data, prediction_data, target_train, learning_rate, lstm_units, batch_size, epochs, seq_len)
      267         batch_size=batch_size,
      268         epochs=epochs,
  --&gt; 269         verbose=2
      270     )
      271     return lstm_model.predict(prediction_data)
  
  ~/Desktop/venv/lib/python3.6/site-packages/keras/engine/training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, max_queue_size, workers, use_multiprocessing, **kwargs)
     1211         else:
     1212             fit_inputs = x + y + sample_weights
  -&gt; 1213         self._make_train_function()
     1214         fit_function = self.train_function
     1215 
  
  ~/Desktop/venv/lib/python3.6/site-packages/keras/engine/training.py in _make_train_function(self)
      314                     training_updates = self.optimizer.get_updates(
      315                         params=self._collected_trainable_weights,
  --&gt; 316                         loss=self.total_loss)
      317                 updates = self.updates + training_updates
      318 
  
  ~/Desktop/venv/lib/python3.6/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs)
       89                 warnings.warn('Update your `' + object_name + '` call to the ' +
       90                               'Keras 2 API: ' + signature, stacklevel=2)
  ---&gt; 91             return func(*args, **kwargs)
       92         wrapper._original_function = func
       93         return wrapper
  
  ~/Desktop/venv/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py in symbolic_fn_wrapper(*args, **kwargs)
       73         if _SYMBOLIC_SCOPE.value:
       74             with get_graph().as_default():
  ---&gt; 75                 return func(*args, **kwargs)
       76         else:
       77             return func(*args, **kwargs)
  
  ~/Desktop/venv/lib/python3.6/site-packages/keras/optimizers.py in get_updates(self, loss, params)
      541                 self.updates.append(K.update(vhat, vhat_t))
      542             else:
  --&gt; 543                 p_t = p - lr_t * m_t / (K.sqrt(v_t) + self.epsilon)
      544 
      545             self.updates.append(K.update(m, m_t))
  
  ~/Desktop/venv/lib/python3.6/site-packages/tensorflow_core/python/ops/math_ops.py in binary_op_wrapper(x, y)
      901         try:
      902           y = ops.convert_to_tensor_v2(
  --&gt; 903               y, dtype_hint=x.dtype.base_dtype, name="y")
      904         except TypeError:
      905           # If the RHS is not a tensor, it might be a tensor aware object
  
  ~/Desktop/venv/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py in convert_to_tensor_v2(value, dtype, dtype_hint, name)
     1240       name=name,
     1241       preferred_dtype=dtype_hint,
  -&gt; 1242       as_ref=False)
     1243 
     1244 
  
  ~/Desktop/venv/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py in internal_convert_to_tensor(value, dtype, name, as_ref, preferred_dtype, ctx, accept_composite_tensors)
     1294 
     1295     if ret is None:
  -&gt; 1296       ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
     1297 
     1298     if ret is NotImplemented:
  
  ~/Desktop/venv/lib/python3.6/site-packages/tensorflow_core/python/framework/constant_op.py in _constant_tensor_conversion_function(v, dtype, name, as_ref)
      284                                          as_ref=False):
      285   _ = as_ref
  --&gt; 286   return constant(v, dtype=dtype, name=name)
      287 
      288 
  
  ~/Desktop/venv/lib/python3.6/site-packages/tensorflow_core/python/framework/constant_op.py in constant(value, dtype, shape, name)
      225   """
      226   return _constant_impl(value, dtype, shape, name, verify_shape=False,
  --&gt; 227                         allow_broadcast=True)
      228 
      229 
  
  ~/Desktop/venv/lib/python3.6/site-packages/tensorflow_core/python/framework/constant_op.py in _constant_impl(value, dtype, shape, name, verify_shape, allow_broadcast)
      263       tensor_util.make_tensor_proto(
      264           value, dtype=dtype, shape=shape, verify_shape=verify_shape,
  --&gt; 265           allow_broadcast=allow_broadcast))
      266   dtype_value = attr_value_pb2.AttrValue(type=tensor_value.tensor.dtype)
      267   const_tensor = g.create_op(
  
  ~/Desktop/venv/lib/python3.6/site-packages/tensorflow_core/python/framework/tensor_util.py in make_tensor_proto(values, dtype, shape, verify_shape, allow_broadcast)
      435   else:
      436     if values is None:
  --&gt; 437       raise ValueError("None values not supported.")
      438     # if dtype is provided, forces numpy array to be the type
      439     # provided if possible.
  
  </code></pre>