title: index error while trying to fit model keras
body: <p>i'm trying to create an autoencoder with keras, here's my code:</p>
  
  <pre><code>from keras import models, layers
  from numpy import array
  import random
  
  data = array(
      [array([[random.randint(0, 100) for i in range(50)]]) for i in range(500)]
  ).reshape((500, 50))
  model = models.Sequential()
  model.add(layers.Dense(input_dim=50, units=50, activation="sigmoid"))
  model.add(layers.Dense(units=40, activation="sigmoid"))
  model.add(layers.Dense(units=50, activation="sigmoid"))
  model.compile(optimizer="adam", loss="mean_squared_error", metrics=["accuracy"])
  model.fit(data, epochs=1)
  </code></pre>
  
  <p>and my error is :</p>
  
  <pre><code>Python\Python36\lib\site-packages\keras\engine\training_arrays.py", line 139, in fit_loop
      if issparse(ins[i]) and not K.is_sparse(feed[i]):
  IndexError: list index out of range
  </code></pre>