code: def load_data(dirname="cifar-100-python", one_hot=False):
      tarpath = maybe_download(
          "cifar-100-python.tar.gz",
          "http://www.cs.toronto.edu/~kriz/",
          dirname,
      )
      X_train = []
      Y_train = []
  
      for i in ["train"]:
          fpath = os.path.join(dirname, i)
          data, labels = load_batch(fpath)
          if i == "train":
              X_train = data
              Y_train = labels
          else:
              X_train = np.concatenate([X_train, data], axis=0)
              Y_train = np.concatenate([Y_train, labels], axis=0)
  
      fpath = os.path.join(dirname, "test")
      X_test, Y_test = load_batch(fpath)
  
      X_train = (
          np.dstack(
              (
                  X_train[:, :1024],
                  X_train[:, 1024:2048],
                  X_train[:, 2048:],
              )
          )
          / 255.0
      )
      X_train = np.reshape(X_train, [-1, 32, 32, 3])
      X_test = (
          np.dstack(
              (X_test[:, :1024], X_test[:, 1024:2048], X_test[:, 2048:])
          )
          / 255.0
      )
      X_test = np.reshape(X_test, [-1, 32, 32, 3])
  
      if one_hot:
          Y_train = to_categorical(Y_train, 100)
          Y_test = to_categorical(Y_test, 100)
  
      return (X_train, Y_train), (X_test, Y_test)
  
file_path: tflearn/tflearn/datasets/cifar100.py
imports: from __future__ import absolute_import, print_function
  import os
  import sys
  from six.moves import urllib
  import tarfile
  import numpy
  import pickle
  from ..data_utils import to_categorical
label_desc: Use image node_id 1 for calling a global function with example usage: load_data(dirname, one_hot) and returns: X_train,  Y_train,  X_test,  Y_test