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)
| 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 | |
| 174 | class SGD(Optimizer): |