class_docstr: Gather slices from ``x`` according to ``indices``, similar to `tf.gather_nd <https://www.tensorflow.org/api_docs/python/tf/gather_nd>`_.
  
  The ``indices`` is a K-dim tensor, where ``indices[i_0,...,i_{K-2}]`` defines a slice
  of ``x``:
  
  .. math::
     output[i_0, ..., i_{K-2}]= x[indices[i_0, ..., i_{K-2}]]
  
  Where ``K = rank(indices)`` and ``x[indices[i_0, ..., i_{K-2}]]`` has rank
  ``rank(x) - indices.shape[-1]``.
  
  Parameters
  ----------
  x: tensor<\*D, T> (Required)
  indices: tensor<\*K, i32> (Required)
  
  Returns
  -------
  tensor<\*V, T>
      * ``V = K[:-1] + D[K[-1]:]``, where ``D = x.shape`` and ``K = indices.shape``.
  
  Attributes
  ----------
  T: fp16, fp32, i32
  
  References
  ----------
  See `tf.gather_nd <https://www.tensorflow.org/api_docs/python/tf/gather_nd>`_.
class_docstr_tok: ["Gather","slices","from","``","x","``","according","to","``","indices","``",",","similar","to","`","tf.gather_nd","<","https",":","\/\/www.tensorflow.org\/api_docs\/python\/tf\/gather_nd",">","`","_",".","The","``","indices","``","is","a","K-dim","tensor",",","where","``","indices","[","i_0",",","...",",","i_","{","K-2","}","]","``","defines","a","slice","of","``","x","``",":","..","math",":",":","output","[","i_0",",","...",",","i_","{","K-2","}","]","=","x","[","indices","[","i_0",",","...",",","i_","{","K-2","}","]","]","Where","``","K","=","rank","(","indices",")","``","and","``","x","[","indices","[","i_0",",","...",",","i_","{","K-2","}","]","]","``","has","rank","``","rank","(","x",")","-","indices.shape","[","-1","]","``",".","Parameters","--","--","--","--","--","x",":","tensor","<","\\","*","D",",","T",">","(","Required",")","indices",":","tensor","<","\\","*","K",",","i32",">","(","Required",")","Returns","--","--","--","-","tensor","<","\\","*","V",",","T",">","*","``","V","=","K","[",":","-1","]","+","D","[","K","[","-1","]",":","]","``",",","where","``","D","=","x.shape","``","and","``","K","=","indices.shape","``",".","Attributes","--","--","--","--","--","T",":","fp16",",","fp32",",","i32","References","--","--","--","--","--","See","`","tf.gather_nd","<","https",":","\/\/www.tensorflow.org\/api_docs\/python\/tf\/gather_nd",">","`","_","."]
code: def type_inference(self):
      assert self.indices.shape[-1] <= self.x.rank
      out_type = self.x.dtype
      out_shape = (
          self.indices.shape[:-1]
          + self.x.shape[self.indices.shape[-1] :]
      )
      return types.tensor(out_type, out_shape)
  
imports: import numpy
  from coremltools.converters.mil.mil import Operation, types
  from coremltools.converters.mil.mil.input_type import DefaultInputs, InputSpec, TensorInputType
  from coremltools.converters.mil.mil.operation import SYMBOL, VALUE, precondition
  from coremltools.converters.mil.mil.ops.defs._op_reqs import register_op
  from coremltools.converters.mil.mil.ops.defs._utils import compute_gather
  from coremltools.converters.mil.mil.types.symbolic import is_compatible_symbolic_vector
label_desc: Use image node_id 1 for calling the gather_nd obj's underlying member method code with example usage: obj.type_inference() and returns: types