code: def infer(self):
      estimator = tf.estimator.Estimator(
          model_fn=self._model_fn,
          params=self.params,
          config=self.run_config,
          model_dir=self.params["model_dir"],
      )
      try:
          worker_idx = json.loads(os.environ["TF_CONFIG"]["task"])
      except Exception:
          worker_idx = 0
      out_idxs = []
      out_embeddings = []
      for output in estimator.predict(input_fn=self.evaluate_input_fn):
          out_idxs.append(output["idx"])
          out_embeddings.append(output["embedding"])
      out_embeddings = np.asarray(out_embeddings)
      out_idxs = np.asarray(out_idxs)
      with open(
          os.path.realpath(
              os.path.join(
                  self.params["infer_dir"],
                  "embedding_{}.npy".format(worker_idx),
              )
          ),
          "wb",
      ) as emb_file:
          np.save(emb_file, out_embeddings)
      with open(
          os.path.realpath(
              os.path.join(
                  self.params["infer_dir"],
                  "ids_{}.npy".format(worker_idx),
              )
          ),
          "wb",
      ) as ids_file:
          np.save(ids_file, out_idxs)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import json
  import numpy
  import tensorflow
  import tf_euler
label_desc: Use image node_id 13 for calling the BaseEstimator obj's underlying member method code with example usage: obj.infer() without return types