title: RAM issues with one hot encoding
body: <p>I know there's been several posts on this, but recently I ran into some RAM issues for a large text while doing one hot encoding for a Bidirectional LSTM.</p>
  <p>Checking online, I discovered there were alternative ways to address this with sklearn or introducing an embedding to layer to keras, which is what I tried here:</p>
  <pre><code>model = Sequential()
  model.add((OneHot(input_dim=vocab_size, input_length= seq_length)))
  model.add(Bidirectional(LSTM(rnn_size, activation=&quot;relu&quot;),input_shape=(seq_length, vocab_size)))
  </code></pre>
  <p>Everything seemed fine here, but then I needed to fit my model (model.fit) along with the typical inputs and outputs parameters. I tried to randomize these variables, and that was when the RAM really blew up.</p>
  <pre><code>X = np.random.random((len(sequences), seq_length, vocab_size))
  y = np.random.randint(2, size=(len(sequences), vocab_size))
  </code></pre>
  <p>Any suggestions on how I could prevent it (either in the final step or along the way)?</p>