title: How to create tensorflow dataset from runtime generated images?
body: <p>So, I start a small project based on tensorflow and could not understand how to prepare dataset generated from memory input.
  I have a random number of sources, that generate images. Than I pass it to python script. Images created as bytes array with png format.
  I collect images to array, and want to prepare dataset from it and train model based on this dataset.</p>
  <pre><code>global_feeded_images = []
  global_feeded_labels = []
  
  
  def feed_image(self, img):
      global global_feeded_images
      global_feeded_images.append(bytes(img))
      global_feeded_labels.append(0)
  </code></pre>
  <p>After collecting all images, I want to start model training.</p>
  <pre><code> model.fit(image_train_ds, np.array(global_feeded_labels), epochs=10)
  </code></pre>
  <p>As I understand, tensorflow could accept numpy array or tensor, but I could not understand, what I should convert, each image separatly or whole array?<br />
  Or, more shortly, how to convert array of images global_feeded_images to dataset image_train_ds?</p>