class_docstr: TF data handler for CIFAR-10 dataset and model.
class_docstr_tok: ["TF","data","handler","for","CIFAR-10","dataset","and","model","."]
docstr: CIFAR-10 dataset and TF model constructor.
  Args:
      batch_size: dataset batch size.
docstr_tok: ["CIFAR-10","dataset","and","TF","model","constructor",".","Args",":","batch_size",":","dataset","batch","size","."]
code: def __init__(self, batch_size=8, data_dir=None):
      """CIFAR-10 dataset and TF model constructor.
      Args:
          batch_size: dataset batch size.
      """
      self._train_data, self._train_labels = None, None
      self._test_data, self._test_labels = None, None
      self._batch_size = batch_size
      self.img_size = IMAGE_SIZE
      self.num_channels = NUM_CHANNELS
      self.num_classes = NUM_CLASSES
      self.train_len = NUM_TRAIN_SAMPLES
      self.test_len = NUM_TEST_SAMPLES
      self.data_dir = data_dir or "./test_data"
      self.cifar10_dir = os.path.join(
          self.data_dir, "cifar-10-batches-py"
      )
      self.cifar10_tarball = os.path.join(
          self.data_dir, CIFAR10_URL.split("/")[-1]
      )
      self.maybe_download_and_extract()
  
file_path: hiddenlayer/demos/tf_cifar10.py
imports: from __future__ import absolute_import, division, print_function
  import os, sys, tarfile, pickle
  import tensorflow
  import numpy
  from urllib.request import urlretrieve
label_desc: Use image node_id 1 to create a new CIFAR10 object  with example: obj = CIFAR10(batch_size, data_dir)