mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-05-17 21:20:11 +00:00
[ci skip] Remove whitespace
This commit is contained in:
parent
dbe8cfceb6
commit
41b66e33ce
1 changed files with 5 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue