torchrl package

Subpackages

Submodules

torchrl.models module

class torchrl.models.A2CNet(input_size, output_size, hidden_size)[source]

Bases: torch.nn.modules.module.Module

forward(obs)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class torchrl.models.ActorCriticNet(input_size, output_size, hidden_size, std=0.0)[source]

Bases: torch.nn.modules.module.Module

forward(obs)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

static init_weights(module)[source]
class torchrl.models.DDPGActorNet(state_size, action_size, hidden_size)[source]

Bases: torch.nn.modules.module.Module

forward(obs)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class torchrl.models.DDPGCriticNet(state_size, action_size, hidden_size)[source]

Bases: torch.nn.modules.module.Module

forward(obs, action)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class torchrl.models.QNet(input_size, output_size)[source]

Bases: torch.nn.modules.module.Module

forward(obs)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Module contents