File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
torchrl/modules/tensordict_module Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -153,14 +153,14 @@ class ProbabilisticActor(SafeProbabilisticTensorDictSequential):
153
153
issues. If this value is out of bounds, it is projected back onto the
154
154
desired space using the :obj:`TensorSpec.project`
155
155
method. Default is ``False``.
156
- default_interaction_type (str , optional): keyword-only argument.
156
+ default_interaction_type (tensordict.nn.InteractionType , optional): keyword-only argument.
157
157
Default method to be used to retrieve
158
- the output value. Should be one of: ' InteractionType.MODE', ' InteractionType.DETERMINISTIC' ,
159
- ' InteractionType.MEDIAN', ' InteractionType.MEAN' or
160
- ' InteractionType.RANDOM' (in which case the value is sampled
158
+ the output value. Should be one of: `` InteractionType.MODE``, `` InteractionType.DETERMINISTIC`` ,
159
+ `` InteractionType.MEDIAN``, `` InteractionType.MEAN`` or
160
+ `` InteractionType.RANDOM`` (in which case the value is sampled
161
161
randomly from the distribution).
162
162
TorchRL's ``ExplorationType`` class is a proxy to ``InteractionType``.
163
- Defaults to is ' InteractionType.DETERMINISTIC' .
163
+ Defaults to `` InteractionType.DETERMINISTIC`` .
164
164
165
165
.. note:: When a sample is drawn, the :class:`ProbabilisticActor` instance will
166
166
first look for the interaction mode dictated by the
Original file line number Diff line number Diff line change @@ -68,12 +68,12 @@ class SafeProbabilisticModule(ProbabilisticTensorDictModule):
68
68
returned by the input module. If the sample is out of bounds, it is
69
69
projected back onto the desired space using the `TensorSpec.project` method.
70
70
Default is ``False``.
71
- default_interaction_type (str , optional): default method to be used to retrieve
72
- the output value. Should be one of: 'mode', 'median', 'mean' or 'random'
71
+ default_interaction_type (tensordict.nn.InteractionType , optional): default method to be used to retrieve
72
+ the output value. Should be one of: ``InteractionType.MODE``, ``InteractionType.MEDIAN``, ``InteractionType.MEAN`` or ``InteractionType.RANDOM``
73
73
(in which case the value is sampled randomly from the distribution). Default
74
- is 'mode' .
74
+ is ``InteractionType.MODE`` .
75
75
Note: When a sample is drawn, the :obj:`ProbabilisticTDModule` instance will
76
- fist look for the interaction mode dictated by the `interaction_typ ()`
76
+ fist look for the interaction mode dictated by the `interaction_type ()`
77
77
global function. If this returns `None` (its default value), then the
78
78
`default_interaction_type` of the :class:`~.ProbabilisticTDModule`
79
79
instance will be used. Note that DataCollector instances will use
You can’t perform that action at this time.
0 commit comments