I am asking for help on a Dl4j code to extract class labels from the output layer of a FaceNetNN4Small2 computationgraph

I have the following code snippet but getLabels() does not work for dl4j version 1.0.0-m2.1. I would not wish to manually use this: String labels = {“Eight”, “Five”, “Four”, “Nine”, “One”, “Seven”, “Six”, “Three”, “Two”, “Zero”}; to access class lable names. Thank you

                          // Load the image and convert it to a 4D array
                           NativeImageLoader loader = new NativeImageLoader(height, width, channels);
                            INDArray testimage = loader.asMatrix(grabbedImage);
                           // testimage = testimage.reshape(1, 3, 96, 96); 
                            // Normalize the pixel values to be between 0 and 1
                            DataNormalization scalar = new ImagePreProcessingScaler(0, 1);
                            //then call that scalar on the image dataset
                            // Pass the input through the model to get the predictions
                            INDArray[] embeddings = model.output(testimage);

                            // Get the output layer index
                                int outputLayerIdx = model.getConfiguration().getNetworkOutputs().size() - 1;
                                // Get the output layer
                                Layer outputLayer = model.getLayer(model.getConfiguration().getNetworkOutputs().get(outputLayerIdx));
         // Get the labels for the output layer
                                String[] labels = ((BaseOutputLayer) outputLayer.conf().getLayer()).getLabels();