class_docstr: Automatic differentiation given an op-tree.
  
  Arguments:
      op_tree (OpTreeNode): the op-tree to take gradient of
      be (Backend): computation backend used
      next_error (Tensor or OpTreeNode, optional): next layer's error, usually
                                                   self.delta in a layer. If
                                                   set to None, then automatically
                                                   the default value is tensor
                                                   ones() in output shape
class_docstr_tok: ["Automatic","differentiation","given","an","op-tree",".","Arguments",":","op_tree","(","OpTreeNode",")",":","the","op-tree","to","take","gradient","of","be","(","Backend",")",":","computation","backend","used","next_error","(","Tensor","or","OpTreeNode",",","optional",")",":","next","layer","'s","error",",","usually","self.delta","in","a","layer",".","If","set","to","None",",","then","automatically","the","default","value","is","tensor","ones","(",")","in","output","shape"]
docstr: Perform cleanup on object deletion.
docstr_tok: ["Perform","cleanup","on","object","deletion","."]
code: def cleanup(self):
      """
      Perform cleanup on object deletion.
      """
      if self.grad_node is not None:
          self.grad_node.cleanup()
      self.grad_node = None
      self.dtype = None
      self.next_error = None
      self.op_tree = None
      self.be = None
  
imports: from __future__ import division
  from builtins import object, zip
  from neon.backends.backend import OpTreeNode, Tensor
  import numpy
  from functools import wraps
label_desc: Use image node_id 3 for calling the Autodiff obj's underlying member method code with example usage: obj.cleanup() without return types