class_docstr: Operations related to finding k-largest elements.
  
  Parameters
  ----------
  axis: integer
      Defaults to ``-1``.
      The axis to perform the operation. Must be in range ``[-ndim, ndim)``, where
      ``ndim`` is the dimensionality of input tensor.
  
  idx_dtype: string
      Specify output dtype for indices, defaults to ``int64``, must be integer type.
  
  sorted: bool
      NOTE: NOT IMPLEMENTED YET
      Defaults to ``True``
  
      If True, the result array would be sorted in descending order.
  
  
  Notes
  -----
  - CPU and GPU ops don't produce same output order. This is expected.
  - The output order is not guaranteed. On the CPU, we use
    ``np.partition`` and ``np.argpartition`` that only make sure the
    k-th element is the correct one and that the other
    elements are on the correct side. On the GPU, they
    look sorted, but we do not test the correctness of this behavior.
  - By default, this Op gives two outputs: values and indices. However
    optimizers may remove a certain output if not needed.
  - Computing the gradient requests the computation of the indices in
    forward pass.
  - If the top-k-th value is not unique, we cannot guarantee the
    output indices being deterministically chosen.
  
  See Also
  --------
  topk
  argtopk
  argtopk_and_topk
class_docstr_tok: ["Operations","related","to","finding","k-largest","elements",".","Parameters","--","--","--","--","--","axis",":","integer","Defaults","to","``","-1","``",".","The","axis","to","perform","the","operation",".","Must","be","in","range","``","[","-ndim",",","ndim",")","``",",","where","``","ndim","``","is","the","dimensionality","of","input","tensor",".","idx_dtype",":","string","Specify","output","dtype","for","indices",",","defaults","to","``","int64","``",",","must","be","integer","type",".","sorted",":","bool","NOTE",":","NOT","IMPLEMENTED","YET","Defaults","to","``","True","``","If","True",",","the","result","array","would","be","sorted","in","descending","order",".","Notes","--","--","-","-","CPU","and","GPU","ops","do","n't","produce","same","output","order",".","This","is","expected",".","-","The","output","order","is","not","guaranteed",".","On","the","CPU",",","we","use","``","np.partition","``","and","``","np.argpartition","``","that","only","make","sure","the","k-th","element","is","the","correct","one","and","that","the","other","elements","are","on","the","correct","side",".","On","the","GPU",",","they","look","sorted",",","but","we","do","not","test","the","correctness","of","this","behavior",".","-","By","default",",","this","Op","gives","two","outputs",":","values","and","indices",".","However","optimizers","may","remove","a","certain","output","if","not","needed",".","-","Computing","the","gradient","requests","the","computation","of","the","indices","in","forward","pass",".","-","If","the","top-k-th","value","is","not","unique",",","we","can","not","guarantee","the","output","indices","being","deterministically","chosen",".","See","Also","--","--","--","--","topk","argtopk","argtopk_and_topk"]
code: def infer_shape(self, node, inp_shapes):
      shp = list(inp_shapes[0])
      shp[self.axis] = np.abs(node.inputs[1])
      shp = tuple(shp)
      return [
          shp for i in [self.return_values, self.return_indices] if i
      ]
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import theano
  from theano.tensor.basic import mul, arange
  from theano.gradient import grad_undefined
  from theano.tensor.subtensor import set_subtensor
label_desc: Use image node_id 5 for calling the TopKOp obj's underlying member method code with example usage: obj.infer_shape(node, inp_shapes) and returns: unknown