class_docstr: Accuracy.
  
  Computes the model accuracy.  The target predictions are assumed
  to be logits.  
  
  If the predictions tensor is 1D (ie shape [?], or [?, 1]), then the 
  labels are assumed to be binary (cast as float32), and accuracy is
  computed based on the average number of equal binary outcomes,
  thresholding predictions on logits > 0.  
  
  Otherwise, accuracy is computed based on categorical outcomes,
  and assumes the inputs (both the model predictions and the labels)
  are one-hot encoded.  tf.argmax is used to obtain categorical
  predictions, for equality comparison.
  
  Examples:
      ```python
      # To be used with TFLearn estimators
      acc = Accuracy()
      regression = regression(net, metric=acc)
      ```
  
  Arguments:
      name: The name to display.
class_docstr_tok: ["Accuracy",".","Computes","the","model","accuracy",".","The","target","predictions","are","assumed","to","be","logits",".","If","the","predictions","tensor","is","1D","(","ie","shape","[","?","]",",","or","[","?",",","1","]",")",",","then","the","labels","are","assumed","to","be","binary","(","cast","as","float32",")",",","and","accuracy","is","computed","based","on","the","average","number","of","equal","binary","outcomes",",","thresholding","predictions","on","logits",">","0",".","Otherwise",",","accuracy","is","computed","based","on","categorical","outcomes",",","and","assumes","the","inputs","(","both","the","model","predictions","and","the","labels",")","are","one-hot","encoded",".","tf.argmax","is","used","to","obtain","categorical","predictions",",","for","equality","comparison",".","Examples",":","``","`","python","#","To","be","used","with","TFLearn","estimators","acc","=","Accuracy","(",")","regression","=","regression","(","net",",","metric=acc",")","``","`","Arguments",":","name",":","The","name","to","display","."]
code: def __init__(self, name=None):
      super(Accuracy, self).__init__(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 1 to create a new Accuracy object from inherited base classes: Metric with example: obj = Accuracy(name)