mlx.nn.Sequential#

class Sequential(*modules)#

A layer that calls the passed callables in order.

We can pass either modules or plain callables to the Sequential module. If our functions have learnable parameters they should be implemented as nn.Module instances.

Parameters:

modules (tuple of Callables) – The modules to call in order

Methods