class_docstr: A CIFAR-100 data provider.
docstr: Returns a partition of the CIFAR-100 `Dataset`.
docstr_tok: ["Returns","a","partition","of","the","CIFAR-100","`","Dataset","`","."]
code: def _cifar100_dataset(self, partition):
      """Returns a partition of the CIFAR-100 `Dataset`."""
  
      cifar100_data = None
      try:
          cifar100_data = cifar100.load_data()
          tf.logging.info("Loaded cifar100.")
      except:  # pylint: disable=bare-except
          tf.logging.info(
              "Can not load cifar100 from internet. Creating dummy data for "
              "testing."
          )
          data = np.zeros((3, 32, 32, 3))
          labels = np.array([[47], [52], [5]])
          data[:, 0, 0] = [220, 25, 47]
          data[:, -1, 0, 0] = 128
          cifar100_data = ((data, labels), (data, labels))
  
      (x_train, y_train), (x_test, y_test) = cifar100_data
  
      x = None
      y = None
      if partition == "train":
          x, y = x_train, y_train
      else:
          x, y = x_test, y_test
  
      dataset = tf.data.Dataset.from_tensor_slices(
          (x, y.astype(np.int32))
      )
      return dataset.cache()
  
file_path: adanet/research/improve_nas/trainer/cifar100.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import numpy
  import tensorflow.compat.v1
  from tensorflow.keras.datasets import cifar100
label_desc: Use image node_id 3 for calling the Provider obj's underlying member method code with example usage: obj._cifar100_dataset(partition) and returns: dataset