continual.continual¶
- continual.continual(module)[source]¶
Convert a
torch.nnmodule to a Continual Inference Network enhanced withforward_stepandforward_steps.Modules may be either
torch.nnModules for which a corresponding module is implemented in this library (e.g.nn.Conv3d), or atorch.nnwhich can be naively mapped (e.g.nn.ReLU).Custom modules can also be made continual by means of the
forward_steppingfunction.Examples
coconv = co.continual(nn.Conv3d(3, 3, 3)) coseq = co.continual(nn.Sequential( nn.Conv3d(3, 3, 3), # Automatically converted as well! nn.ReLU() ))
- Return type: