class_docstr: Top-k.
  
  Computes Top-k mean accuracy (whether the targets are in the top 'K'
  predictions).
  
  Examples:
      ```python
      # To be used with TFLearn estimators
      top5 = Top_k(k=5)
      regression = regression(net, metric=top5)
      ```
  
  Arguments:
      k: `int`. Number of top elements to look at for computing precision.
      name: The name to display.
class_docstr_tok: ["Top-k.","Computes","Top-k","mean","accuracy","(","whether","the","targets","are","in","the","top","'","K'","predictions",")",".","Examples",":","``","`","python","#","To","be","used","with","TFLearn","estimators","top5","=","Top_k","(","k=5",")","regression","=","regression","(","net",",","metric=top5",")","``","`","Arguments",":","k",":","`","int","`",".","Number","of","top","elements","to","look","at","for","computing","precision",".","name",":","The","name","to","display","."]
docstr: Build top-k accuracy, comparing top-k predictions and targets. 
docstr_tok: ["Build","top-k","accuracy",",","comparing","top-k","predictions","and","targets","."]
code: def build(self, predictions, targets, inputs=None):
      """Build top-k accuracy, comparing top-k predictions and targets."""
      self.built = True
      self.tensor = top_k_op(predictions, targets, self.k)
      # Add a special name to that tensor, to be used by monitors
      self.tensor.m_name = self.name
  
imports: from __future__ import division, print_function, absolute_import
  from .utils import get_from_module
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling the Top_k obj's underlying member method code with example usage: obj.build(predictions, targets, inputs) without return types