Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions torchrl/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,12 +643,12 @@ def fake_tensordict(self) -> TensorDictBase:

"""
input_spec = self.input_spec
fake_input = input_spec.zero()
fake_input = input_spec.zero(self.batch_size)
observation_spec = self.observation_spec
fake_obs = observation_spec.zero()
fake_obs = observation_spec.zero(self.batch_size)
fake_obs_step = step_tensordict(fake_obs)
reward_spec = self.reward_spec
fake_reward = reward_spec.zero()
fake_reward = reward_spec.zero(self.batch_size)
fake_td = TensorDict(
{
**fake_obs_step,
Expand Down
9 changes: 8 additions & 1 deletion torchrl/modules/distributions/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
from torchrl.modules.distributions.utils import _cast_device
from torchrl.modules.utils import mappings

__all__ = ["NormalParamWrapper", "TanhNormal", "Delta", "TanhDelta", "TruncatedNormal"]
__all__ = [
"NormalParamWrapper",
"TanhNormal",
"Delta",
"TanhDelta",
"TruncatedNormal",
"IndependentNormal",
]

# speeds up distribution construction
D.Distribution.set_default_validate_args(False)
Expand Down
11 changes: 6 additions & 5 deletions tutorials/coding_ddpg.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
"cell_type": "code",
"execution_count": null,
"id": "d9661521",
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"!pip install functorch\n",
Expand Down Expand Up @@ -805,11 +809,8 @@
},
{
"cell_type": "markdown",
"id": "16fe83b8-1869-4d03-8ded-0921c8df5a73",
"id": "fe149c1a",
"metadata": {
"jupyter": {
"outputs_hidden": false
},
"pycharm": {
"name": "#%%\n"
}
Expand Down
Loading