neon.backends.autodiff.GradNode

class neon.backends.autodiff.GradNode(op_tree, ad)[source]

Bases: object

A node in grad_tree. A GradNode contains the op_optree and the grad_op_tree at this location of the grad_tree, and it also has pointers to the left and right child in the grad_tree.

__init__(op_tree, ad)[source]
Parameters:
  • op_tree (OpTreeNode or Tensor) – the op_tree at this grad_node
  • ad (Autodiff) – the autodiff object with global op_tree, next_error and dicts

Methods

__init__(op_tree, ad)
param op_tree:the op_tree at this grad_node
build_grad() Actually back-propagate the gradient.
cleanup() Perform cleanup on object deletion.
ad
build_grad()[source]

Actually back-propagate the gradient.

cleanup()[source]

Perform cleanup on object deletion.

grad_op_tree
left
op_tree
right