Configurable.clone

Configurable.clone(copy_parameters=True)[source]

Clones this module by initializing another module with the same configuration.

Parameters

copy_parameters (bool) -- Whether to copy this module's parameters or initialize the new module with random parameters.

Return type

TypeVar(M, bound= ConfigurableModule)

Returns

The cloned module.