Skip to content

Commit 0cfe90f

Browse files
committed
Address comments
1 parent c4e54c9 commit 0cfe90f

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

alf/algorithms/actor_critic_algorithm.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,25 @@ def __init__(self,
9797
loss_class (type): the class of the loss. The signature of its
9898
constructor: ``loss_class(debug_summaries)``
9999
actor_avg_fns: a list of functions for doing model averaging for
100-
the trajectory predictor. Each function will be responsible for
100+
the actor network. Each function will be responsible for
101101
performing one model averaging. The function must take in the
102102
current value of the `AveragedModel` parameter, the
103103
current value of `model` parameter, and the number of models
104104
already averaged. See alf.utils/model_averager.ema_avg_fn for an example.
105+
106+
Example:
107+
108+
.. code-block:: python
109+
110+
actor_avg_fns=[
111+
partial(ema_avg_fn,
112+
ema_rate=1e-3,
113+
starting_average_after=300_000),
114+
partial(ema_avg_fn,
115+
ema_rate=1e-2,
116+
starting_average_after=300_000),
117+
])
118+
105119
predict_ema_id: the index of the actor average model to be used
106120
for prediction. -1 means the original actor network is used.
107121
0 means the first averaged model in actor_avg_fns is used,

0 commit comments

Comments
 (0)