vkML 0.1.0

Sequential

Chain modules, calling each on the previous one's output.

class Sequential : Modulepython/vkml/nn.py:324

Children are registered under their positional index, so a state_dict key reads 0.weight, 1.bias and so on — the same convention as torch, which is what lets a torch Sequential checkpoint load here.

Construction

__init__

def __init__self, *layers: Modulepython/vkml/nn.py:325

Forward

forward

def forwardself, x: V.Tensor -> V.Tensorpython/vkml/nn.py:330

Access

__getitem__

def __getitem__self, i: int -> Modulepython/vkml/nn.py:338

__len__

def __len__self -> intpython/vkml/nn.py:335

See also Module, Linear

vkML — Vulkan-first machine learning in C++20. Apache-2.0. Signatures on this page are generated from the installed module.