title: How to create a CNN image classification model that can generate a Text file for our labels?
body: <p>I have a CNN model which should recognize fonts of the different alphabets, I use this code to generate my test and train and validation sets.</p>
  <pre><code># load and iterate training dataset
  train_it = datagen.flow_from_directory(dir, class_mode='binary', batch_size=64)
  # load and iterate validation dataset
  val_it = datagen.flow_from_directory(dir, class_mode='binary', batch_size=64)
  # load and iterate test dataset
  test_it = datagen.flow_from_directory(dir, class_mode='binary', batch_size=64)
  </code></pre>
  <p>and this is how I fit my model</p>
  <pre><code># fit model
  model.fit(train_it, steps_per_epoch=8, validation_data=val_it, validation_steps=5, epochs= 10)
  </code></pre>
  <p>my model at the end should get the input and then load the trained model and generate the labels in the output as a .txt file. The text file should have 1000 lines and in each line, the label of each sample is written, for example, “A”, “B”, etc. I want to know how I can do that?</p>