title: Keras show MemoryError at model.fit()
body: <p>I keep getting MemoryError without additional explanation from Keras at model.fit(), no matter how small the number of neurons or batch size. Does anyone have any idea what error does this error refer to or how to fix this?</p>
  
  <p>Error:</p>
  
  <pre><code>Using TensorFlow backend.
  Traceback (most recent call last):
    File "C:/Users/ideapad/Dropbox/TA/preprocessTA/kerass.py", line 32, in &lt;module&gt;
      model.fit(np.array(fd.dataTrain), np.array(fd.outputTrain), batch_size=batch_size, epochs=100, verbose=1)
  MemoryError
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>import fetchData as fd
  import numpy as np
  
  from keras.models import Sequential
  from keras.layers import Dense, Activation, LSTM, Dropout, Embedding
  
  model = Sequential()
  model.add(Embedding(num_input, num_output))
  model.add(LSTM(neuron_1))
  model.add(Dropout(dropout))
  model.add(Dense(num_output))
  model.add(Activation(activation_function))
  
  model.compile(loss=loss_function, optimizer=optimizer_function, metrics=['mae'])
  
  model.fit(np.array(fd.dataTrain), np.array(fd.outputTrain), batch_size=batch_size, epochs=100, verbose=1)
  score = model.evaluate(np.array(fd.dataTest), np.array(fd.outputTest))
  print(score)
  </code></pre>