MCPcopy Create free account
hub / github.com/apache/singa / backward_and_update

Method backward_and_update

python/singa/opt.py:160–171  ·  view source on GitHub ↗

Performs backward propagation from the loss and parameter update. From the loss, it performs backward propagation to get the gradients and do the parameter update. Args: loss(Tensor): loss is the objective function of the deep learning model

(self, loss)

Source from the content-addressed store, hash-verified

158 "backward_and_update is deprecated, use __call__() to do update, refer to __call__ for more details."
159 )
160 def backward_and_update(self, loss):
161 """Performs backward propagation from the loss and parameter update.
162
163 From the loss, it performs backward propagation to get the gradients
164 and do the parameter update.
165
166 Args:
167 loss(Tensor): loss is the objective function of the deep learning model
168 optimization, e.g. for classification problem it can be the output of the
169 softmax_cross_entropy function.
170 """
171 self.__call__(loss)
172
173
174class SGD(Optimizer):

Callers

nothing calls this directly

Calls 1

__call__Method · 0.95

Tested by

no test coverage detected