Shortcuts

continual.call_mode

continual.call_mode = <continual.module._CallModeContext object>

Context-manager which temporarily specifies a call_mode

When the call_mode context is used, the __call__ function of continual modules with be set accordingly

Example:

sequence = torch.randn(1, 3, 10)
step = sequence[:, :, -1]

forward_output = module(sequence)  # Calls `forward`

with co.call_mode("forward_step"):
    forward_step_output = module(step)  # Calls `forward_step`

forward_output = module(sequence)  # Calls `forward`
Read the Docs v: latest
Versions
latest
stable
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.