parameters: (meta_path, mean_img_size, crop_size, color=True)
return_statement: return mean
docstring: Return the loaded meta file.
      Load the meta image, which is the mean of the images in the dataset.
      The mean image is subtracted from every input image so that the expected mean
      of each input image is zero.
docstring_summary: Return the loaded meta file.
      Load the meta image, which is the mean of the images in the dataset.
      The mean image is subtracted from every input image so that the expected mean
      of each input image is zero.
docstring_tokens: Return the loaded meta file . Load the meta image which is the mean of the images in the dataset . The mean image is subtracted from every input image so that the expected mean of each input image is zero .
function: def load_meta(meta_path, mean_img_size, crop_size, color=True):
      """
      Return the loaded meta file.
      Load the meta image, which is the mean of the images in the dataset.
      The mean image is subtracted from every input image so that the expected mean
      of each input image is zero.
      """
      mean = np.load(meta_path)['data_mean']
      border = (mean_img_size - crop_size) / 2
      if color:
          assert (mean_img_size * mean_img_size * 3 == mean.shape[0])
          mean = mean.reshape(3, mean_img_size, mean_img_size)
          mean = mean[:, border:border + crop_size, border:border +
                      crop_size].astype('float32')
      else:
          assert (mean_img_size * mean_img_size == mean.shape[0])
          mean = mean.reshape(mean_img_size, mean_img_size)
          mean = mean[border:border + crop_size, border:border +
                      crop_size].astype('float32')
      return mean
function_tokens: def load_meta ( meta_path , mean_img_size , crop_size , color = True ) : mean = np . load ( meta_path ) [ 'data_mean' ] border = ( mean_img_size - crop_size ) / 2 if color : assert ( mean_img_size * mean_img_size * 3 == mean . shape [ 0 ] ) mean = mean . reshape ( 3 , mean_img_size , mean_img_size ) mean = mean [ : , border : border + crop_size , border : border + crop_size ] . astype ( 'float32' ) else : assert ( mean_img_size * mean_img_size == mean . shape [ 0 ] ) mean = mean . reshape ( mean_img_size , mean_img_size ) mean = mean [ border : border + crop_size , border : border + crop_size ] . astype ( 'float32' ) return mean