code: public TF_Session loadSavedModel(SavedModelConfig savedModelConfig, TF_SessionOptions options, TF_Buffer runOptions, TF_Graph graph, Map<String, String> inputsMap, Map<String, String> outputsMap, TF_Status status) {
          TF_Buffer metaGraph = TF_Buffer.newBuffer();
          TF_Session session = TF_LoadSessionFromSavedModel(options, runOptions, new BytePointer(savedModelConfig.getSavedModelPath()),
                  new BytePointer(savedModelConfig.getModelTag()), 1, graph, metaGraph, status);
          if (TF_GetCode(status) != TF_OK) {
              throw new IllegalStateException("ERROR: Unable to import model " + TF_Message(status).getString());
          }
  
          MetaGraphDef metaGraphDef;
          try {
              metaGraphDef = MetaGraphDef.parseFrom(metaGraph.data().capacity(metaGraph.length()).asByteBuffer());
          } catch (InvalidProtocolBufferException ex) {
              throw new IllegalStateException("ERROR: Unable to import model " + ex);
          }
          Map<String, SignatureDef> signatureDefMap = metaGraphDef.getSignatureDefMap();
          SignatureDef signatureDef = signatureDefMap.get(savedModelConfig.getSignatureKey());
  
          Map<String, TensorInfo> inputs = signatureDef.getInputsMap();
          for (Map.Entry<String, TensorInfo> e : inputs.entrySet()) {
              inputsMap.put(e.getKey(), e.getValue().getName());
          }
  
          Map<String, TensorInfo> outputs = signatureDef.getOutputsMap();
          for (Map.Entry<String, TensorInfo> e : outputs.entrySet()) {
              outputsMap.put(e.getKey(), e.getValue().getName());
          }
  
          return session;
      }
docs: Load a session based on the saved model
  @param savedModelConfig the configuration for the saved model
  @param options the session options to use
  @param runOptions the run configuration to use
  @param graph the tf graph to use
  @param inputsMap the input map
  @param outputsMap the output names
  @param status  the status object to use for verifying the results
  @return