Is there any way to extract class labels from the output layer of a FaceNetNN4Small2 computationgraph in DL4J 1.0.0-M2.1

I have the following code but getLabels() seems not to be working for DL4J 1.0.0-M2.1
I am trying to dodge this manual alternative way: String labels = {“Eight”, “Five”, “Four”, “Nine”, “One”, “Seven”, “Six”, “Three”, “Two”, “Zero”};

                          // 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();

@AUGUSTINE-BEILEL could you clarify your problem a bit more? Are you trying to get printable labels out of the model?

As far as I remember the model does not actually save the string names of the labels. It doesn’t actually care about them at all.

So unless anything has changed, it is actually impossible to get the string labels directly from the model.

Thanks Mr. Agibsonccc.

Yes, I would like to get printable string labels out of FaceNetNN4Small2 model

Thank you Mr. Treo for your feedback.

But is there any way to tell the model to save the string names of the labels?

@AUGUSTINE-BEILEL you would normally do that as part of the dataset or as part of your application. If you need specific help of pulling from the original labels or something else I can take a look so you can at least use it in your application.