mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-11-17 08:56:08 +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.
|
target parameters are slowly updated towards the main parameters.
|
||||||
``tau``, the soft update coefficient controls the interpolation:
|
``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``.
|
``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,
|
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
|
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
|
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).
|
params (in place).
|
||||||
See https://github.com/DLR-RM/stable-baselines3/issues/93
|
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 params: (Iterable[th.nn.Parameter]) parameters to use to update the target params
|
||||||
:param target_params: (Iterable[th.nn.Parameter]) parameters to update
|
:param target_params: (Iterable[th.nn.Parameter]) parameters to update
|
||||||
:param tau: (float) the soft update coefficient ("Polyak update", between 0 and 1)
|
:param tau: (float) the soft update coefficient ("Polyak update", between 0 and 1)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue