class ModuleFactory[source]#

Represents a factory for the creation of a torch module given an environment and target device.

abstract create_module(envs: Environments, device: str | device) Module[source]#
init_linear_orthogonal(module: Module) None[source]#

Applies orthogonal initialization to linear layers of the given module and sets bias weights to 0.


module – the module whose submodules are to be processed