diff --git a/python/paddle/hapi/model.py b/python/paddle/hapi/model.py index d2493a747444d053afda3e5acd0c4f066e412f95..f4d3a78e250ac5555899a6c0151ee8ecbc69a524 100644 --- a/python/paddle/hapi/model.py +++ b/python/paddle/hapi/model.py @@ -1031,6 +1031,7 @@ class Model(object): a numpy array or paddle.Tensor, or a list of arrays or tensors (in case the model has multiple labels). If has no labels, set None. Default is None. + update (bool): Whether update parameters after loss.backward() computes. Using this to accumulate gradients. Default is True. Returns: A list of scalar training loss if the model has no metrics, @@ -2046,9 +2047,6 @@ class Model(object): outs = getattr(self, mode + '_batch')(*_inputs) - # outs = getattr(self, mode + '_batch')(data[:len(self._inputs)], - # data[len(self._inputs):]) - if self._metrics and self._loss: metrics = [[l[0] for l in outs[0]]] elif self._loss: