Caffe2 - Python API
A deep learning, cross platform ML framework
Public Member Functions | Static Public Attributes | List of all members
caffe2.python.core.GradientRegistry Class Reference
Inheritance diagram for caffe2.python.core.GradientRegistry:

Public Member Functions

def RegisterGradient (cls, op_type)
def GetGradientForOp (cls, op, g_output)
def GetBackwardPass (cls, operators, ys, ys_generate_gradient=False)

Static Public Attributes

dictionary gradient_registry_ = {}

Detailed Description

GradientRegistry holds the mapping from operators to their gradients.

Definition at line 1055 of file

Member Function Documentation

def caffe2.python.core.GradientRegistry.GetBackwardPass (   cls,
  ys_generate_gradient = False 
Gets the backward pass for the list of operators.

    operators: a list of operators constituting the forward pass.
    ys: a list or a dictionary specifying what blobs we want to compute
derivatives of. If the input is a list, we will automatically
generate their gradients with all-one values; if the input is a
dictionary, for any dictionary entries that are not None, we'll
take the corresponding blobs as their gradients; for all those
that are None, we will auto-fill them with 1.
    gradient_ops: a list of gradient operators to run.
    all_input_to_grads: a map from input to their corresponding

Definition at line 1133 of file

def caffe2.python.core.GradientRegistry.RegisterGradient (   cls,
A decorator for registering gradient mappings.

Definition at line 1060 of file

The documentation for this class was generated from the following file: