From 41b66e33ce850eb75f136a69e3373ed4fa97ee12 Mon Sep 17 00:00:00 2001 From: Antonin RAFFIN Date: Mon, 20 Jul 2020 11:20:12 +0200 Subject: [PATCH] [ci skip] Remove whitespace --- stable_baselines3/common/utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stable_baselines3/common/utils.py b/stable_baselines3/common/utils.py index 839bc59..1c1b850 100644 --- a/stable_baselines3/common/utils.py +++ b/stable_baselines3/common/utils.py @@ -292,12 +292,12 @@ def polyak_update(params: Iterable[th.nn.Parameter], target_params: Iterable[th. target parameters are slowly updated towards the main parameters. ``tau``, the soft update coefficient controls the interpolation: ``tau=1`` corresponds to copying the parameters to the target ones whereas nothing happens when ``tau=0``. - The Polyak update is done in place, with ``no_grad``, and therefore does not create intermediate tensors, - or a computation graph, reducing memory cost and improving performance. We scale the target params - by ``1-tau`` (in-place), add the new weights, scaled by ``tau`` and store the result of the sum in the target - params (in place). + The Polyak update is done in place, with ``no_grad``, and therefore does not create intermediate tensors, + or a computation graph, reducing memory cost and improving performance. We scale the target params + by ``1-tau`` (in-place), add the new weights, scaled by ``tau`` and store the result of the sum in the target + params (in place). See https://github.com/DLR-RM/stable-baselines3/issues/93 - + :param params: (Iterable[th.nn.Parameter]) parameters to use to update the target params :param target_params: (Iterable[th.nn.Parameter]) parameters to update :param tau: (float) the soft update coefficient ("Polyak update", between 0 and 1)