title: How can you load all batch data into GPU memory in Keras (Theano backend)?
body: <p>Keras loads data onto the GPU batch-by-batch (noted by the author <a href="https://github.com/fchollet/keras/issues/249" rel="noreferrer">here</a>).</p>
  
  <p>For small datasets, this is very inefficient.  Is there a way to modify Keras or call Theano functions directly (after defining the model in Keras) to allow all batches to be moved to the GPU up front, and training done using the batches already in GPU memory?</p>
  
  <p>(Someone asked the same question <a href="https://groups.google.com/forum/#!topic/keras-users/1yANBtgJMuE" rel="noreferrer">on the Keras list</a> a few weeks ago, but has no replies so far.)</p>