class_docstr: Produces [image, label] in Caltech101 Silhouettes dataset,
  image is 28x28 in the range [0,1], label is an int in the range [0,100].
docstr: Args:
      name (str): 'train', 'test', 'val'
      shuffle (bool): shuffle the dataset
code: def __init__(self, name, shuffle=True, dir=None):
      """
      Args:
          name (str): 'train', 'test', 'val'
          shuffle (bool): shuffle the dataset
      """
      if dir is None:
          dir = get_dataset_path(self._DIR_NAME)
      assert name in ["train", "test", "val"]
      self.name = name
      self.shuffle = shuffle
  
      def get_images_and_labels(data_file):
          f = maybe_download(self._SOURCE_URL + data_file, dir)
          data = scipy.io.loadmat(f)
          return data
  
      self.data = get_images_and_labels(
          "caltech101_silhouettes_28_split1.mat"
      )
  
      if self.name == "train":
          self.images = self.data["train_data"].reshape((4100, 28, 28))
          self.labels = self.data["train_labels"].ravel() - 1
      elif self.name == "test":
          self.images = self.data["test_data"].reshape((2307, 28, 28))
          self.labels = self.data["test_labels"].ravel() - 1
      else:
          self.images = self.data["val_data"].reshape((2264, 28, 28))
          self.labels = self.data["val_labels"].ravel() - 1
  
file_path: tensorpack/tensorpack/dataflow/dataset/caltech101.py
imports: import os
  from ...utils import logger
  from ...utils.fs import download, get_dataset_path
  from ..base import RNGDataFlow
label_desc: Use image node_id 1 to create a new Caltech101Silhouettes object from inherited base classes: RNGDataFlow with example: obj = Caltech101Silhouettes(name, shuffle, dir)