continual.forward_stepping¶
- continual.forward_stepping(module, dim=2)[source]¶
Enhances torch.nn.Module with forward_step and forward_steps
Note
The passed module must not have time-dependent operations! For instance,
module = nn.Conv3d(1, 1, kernel_size=(1,1,1))
is OK, but results formodule = nn.Conv3d(1, 1, kernel_size=(3,3,3))
would be invalid.Alternatively, one may attempt to automatically convert the module by using
co.continual
instead.- Parameters:
module (nn.Module) – the torch.nn.Module to enchance.
dim (int, optional) – The dimension to unsqueeze during forward_step. Defaults to 2.