Sequential

Base class for deriving trainable modules

class ivy.neural_net_stateful.sequential.Sequential(*sub_modules, dev_str='cpu', v=None)[source]

Bases: ivy.neural_net_stateful.module.Module

__init__(*sub_modules, dev_str='cpu', v=None)[source]

A sequential container. Modules will be added to it in the order they are passed in the constructor.

Parameters
  • submodules (sequence of ivy.Module instances) – Submodules to chain together into a sequence.

  • dev_str (str, optional) – device on which to create the layer’s variables ‘cuda:0’, ‘cuda:1’, ‘cpu’ etc.

  • v (ivy container of variables, optional) – the variables for each submodule in the sequence, constructed internally by default.

Sequential