torch_blue.vi.VISequential
- class torch_blue.vi.VISequential(*args: torch.nn.Module)
- class VISequential(arg: OrderedDict[str, torch.nn.Module])
Bases:
torch_blue.vi.base.VIModule,torch.nn.SequentialSequential container for
VIModule.Equivalent to
nn.Sequential, that managesVIModuletoo. See its documentation for usage.Detects and aggregates prior_log_prob and variational_log_prob from submodules, if needed. Then passes on only the output to the next module. This makes mixed sequences of
VIModuleandnn.Modulework with and withoutreturn_log_probs.- forward(input_)
Forward pass that manages log probs, if required.
- Parameters:
input (Varies) – Input for the first module in the stack. Passed on to it unchanged.
- Returns:
output – Output of the module stack.
- Return type:
Varies