← back to Exo
.typings/mlx/nn/layers/containers.pyi
22 lines
"""
This type stub file was generated by pyright.
"""
from typing import Callable
import mlx.core as mx
from base import Module
class Sequential(Module):
"""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.
Args:
modules (tuple of Callables): The modules to call in order
"""
def __init__(self, *modules: Module | Callable[[mx.array], mx.array]) -> None: ...
def __call__(self, x: mx.array) -> mx.array: ...