Skip to content

sharded_module_mixin

allennlp.nn.parallel.sharded_module_mixin

[SOURCE]


ShardedModuleMixin

class ShardedModuleMixin

Mixin class for sharded data parallel wrappers. Subclasses should implement get_original_module() which returns a reference the original inner wrapped module.

get_original_module

class ShardedModuleMixin:
 | ...
 | def get_original_module(self) -> torch.nn.Module

Get the original