title: Keras auto generate batch sizes
body: <p>Is there a way to auto-generate the batch size based on the GPU's memory in keras? As far as I know, the batch size is mainly used to tweak how large the model uses up the vram. Currently, I just use trial and error to set a good batch size but I don't know if there is an easier way. This works okay, but it is a little tedious. If I am trying to run multiple different models where I can leave my computer running for multiple days, I'd like it to be most efficient with every model.</p>
  
  <p>Edit:
  Some pseudo code</p>
  
  <pre><code># What I currently do
  batch = 32
  model.fit(x_train, y_train, batch_size=batch)
  # here I have to manually change batch to maximize my gpu
  
  # What I would prefer to do
  model.fit(x_train, y_train, batch_size='auto')
  # where the auto takes into account the size of my gpu 
  # and adjusts the batch_size automatically
  </code></pre>