analogvnn.nn.module.Sequential#

Module Contents#

Classes#

Sequential

Base class for all sequential models.

class analogvnn.nn.module.Sequential.Sequential(tensorboard_log_dir=None, device=is_cpu_cuda.device)[source]#

Bases: analogvnn.nn.module.Model.Model, torch.nn.Sequential

Base class for all sequential models.

__call__(*args, **kwargs)[source]#

Call the model.

Parameters:
  • *args – The input.

  • **kwargs – The input.

Returns:

The output of the model.

Return type:

torch.Tensor

compile(device: Optional[torch.device] = None, layer_data: bool = True)[source]#

Compile the model and add forward graph.

Parameters:
  • device (torch.device) – The device to run the model on.

  • layer_data (bool) – True if the data of the layers should be compiled.

Returns:

self

Return type:

Sequential

add_sequence(*args)[source]#

Add a sequence of modules to the forward graph of model.

Parameters:

*args (nn.Module) – The modules to add.