title: How can I solve error "allocation exceeds 10 of system memory" on keras?
body: <p>I made a CNN on Keras with Tensorflow backend, my training set has 144 examples, but each example has size of 3200*101. My CNN is very basic, just for learning, batch_size of 2 (I tried reducing it from 32 but nothing improves). One CNN layer, one flatten layer and one dense layer for output (11 classes). When I fit the model, my laptop shows &quot;Allocation of (a big number) exceeds 10 of system memory&quot; and then freezes, even without running 1 epoch. I can't &quot;compress&quot; the examples, each of them must have that size exactly. I am running the model on my CPU (I don't have a GPU), 8 gb ram, 1 tb disk. What can I do?</p>
  <p>Psdt: Sorry for any bad english, I am still learning. And thanks for any answer!</p>
  <p>Update-Editing: Just adding more information.</p>
  <p>My train set is of shape (144, 3400, 101, 1) for examples and for labels is of shape (144,11)
  My model is like this:</p>
  <pre><code>model.add(Conv2D(8, kernel_size=6, activation='linear', input_shape=(3400,101,1), batch_size=2))
  model.add(Flatten())
  model.add(Dense(11, activation='softmax'))
  model.compile(optimizer='sgd', loss='categorical_crossentropy', metrics=['accuracy'])
  model.fit(X_train, y_train, epochs=100)
  </code></pre>