class_docstr: Save mnist data into TFRecordDataset and get samples from generator
class_docstr_tok: ["Save","mnist","data","into","TFRecordDataset","and","get","samples","from","generator"]
code: def __init__(self, batch_size=32, train=True) -> None:
      self.batch_size = batch_size
      self.train = train
      if self.train:
          self.num_samples = 60000
      else:
          self.num_samples = 10000
      self.row = 28
      self.column = 28
      self.channel = 1
      self.num_classes = 10
      self.iterations = self.num_samples // self.batch_size
      self.file_name = None
  
imports: import os
  import tensorflow
  from tensorflow.keras.datasets import mnist
  from .convert import decode_data
  from .convert import decode_image
  from .convert import decode_label
  from .convert import save_data
  from .convert import save_image
  from .convert import save_label
label_desc: Use image node_id 1 to create a new MnistDataset object  with example: obj = MnistDataset(batch_size, train)