code: public static List<String> getLabels(boolean categories){
          List<String> rawLabels = new Cifar10DataSetIterator(1).getLabels();
          if(categories){
              return rawLabels;
          }
  
          //Otherwise, convert to human-readable format, using 'words.txt' file
          File baseDir = DL4JResources.getDirectory(ResourceType.DATASET, Cifar10Fetcher.LOCAL_CACHE_NAME);
          File labelFile = new File(baseDir, Cifar10Fetcher.LABELS_FILENAME);
          List<String> lines;
          try {
              lines = FileUtils.readLines(labelFile, StandardCharsets.UTF_8);
          } catch (IOException e){
              throw new RuntimeException("Error reading label file", e);
          }
  
          Map<String,String> map = new HashMap<>();
          for(String line : lines){
              String[] split = line.split("\t");
              map.put(split[0], split[1]);
          }
  
          List<String> outLabels = new ArrayList<>(rawLabels.size());
          for(String s : rawLabels){
              String s2 = map.get(s);
              Preconditions.checkState(s2 != null, "Label \"%s\" not found in labels.txt file");
              outLabels.add(s2);
          }
          return outLabels;
      }
docs: Get the labels - either in "categories" (imagenet synsets format, "n01910747" or similar) or human-readable format,
  such as "jellyfish"
  @param categories If true: return category/synset format; false: return "human readable" label format
  @return Labels