title: How do I generate custom tensorflow training / validation data,
body: <p>I'm trying to classify a bunch of sequences based on the number of occurrences of a particular character.
  I'm wanting a network with a 1-dimensional input, so the input (of variable length) can be fed in one character at a time. I then want a floating classification, that's updated after every character is processed.</p>
  
  <p>I'm new to tensforflow, and using the following tutorial: <a href="https://www.tensorflow.org/tutorials/text/text_classification_rnn" rel="nofollow noreferrer">https://www.tensorflow.org/tutorials/text/text_classification_rnn</a></p>
  
  <p>A lot of it seems irrelevant as I'm trying to use a completely different dataset.</p>
  
  <p>I've generated my (training/validation 70-30%) data and saved them in a dictionary of the form: <code>{sequence_string: classification}</code>.</p>
  
  <p>And I've started investigating the following code for building a model:</p>
  
  <pre><code>model = tf.keras.Sequential([
      tf.keras.layers.Embedding(2 ** SEQUENCE_MAX_LENGTH, 64),
      tf.keras.layers.Bidirectional(tf.keras.layers.LSTM(64, return_sequences=True)),
      tf.keras.layers.Bidirectional(tf.keras.layers.LSTM(32)),
      tf.keras.layers.Dense(64, activation='relu'),
      tf.keras.layers.Dropout(0.5),
      tf.keras.layers.Dense(1, activation='sigmoid')
  ])
  
  model.compile(loss='binary_crossentropy',
                optimizer=tf.keras.optimizers.Adam(1e-4),
                metrics=['accuracy'])
  
  history = model.fit(
      TRAINING_DATA, &lt;&lt; Doesnt work because my training data format is completely off 
      epochs=10,
      validation_data=TEST_DATA,
      validation_steps=30
  )
  </code></pre>
  
  <p>Is this the correct API to be using?
  How would I convert my current data to a usable training set?</p>