code: def _initializeDimensions(self, inputData):
      
      if len(inputData.shape) == 2:
        self.imageHeight, self.numImages = inputData.shape
        self.imageWidth, self.numChannels = None, None
  
      elif len(inputData.shape) == 3:
        self.imageHeight, \
        self.imageWidth, \
        self.numImages = inputData.shape
        self.numChannels = None
  
      elif len(inputData.shape) == 4:
        self.imageHeight, \
        self.imageWidth, \
        self.numChannels, \
        self.numImages = inputData.shape
  
      else:
        raise ValueError("The provided image set has more than 4 dimensions.")
docs: Stores the training images' dimensions, for convenience.