|
dictionary | gradient_registry_ = {} |
|
GradientRegistry holds the mapping from operators to their gradients.
Definition at line 1055 of file core.py.
def caffe2.python.core.GradientRegistry.GetBackwardPass |
( |
|
cls, |
|
|
|
operators, |
|
|
|
ys, |
|
|
|
ys_generate_gradient = False |
|
) |
| |
Gets the backward pass for the list of operators.
Args:
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.
Returns:
gradient_ops: a list of gradient operators to run.
all_input_to_grads: a map from input to their corresponding
gradients.
Definition at line 1133 of file core.py.
def caffe2.python.core.GradientRegistry.RegisterGradient |
( |
|
cls, |
|
|
|
op_type |
|
) |
| |
A decorator for registering gradient mappings.
Definition at line 1060 of file core.py.
The documentation for this class was generated from the following file: