vkML 0.1.0

Conv2d

2-D convolution, matching torch.nn.Conv2d.

class Conv2d : Modulepython/vkml/nn.py:659

Calls conv2d, which lowers to im2col followed by matmul — so every GEMM improvement reaches this layer for free, and so does the im2col memory expansion.

⚠ Warning

Grouped and depthwise convolution are not supported; the weight's input channels must equal the input's.

Construction

__init__

def __init__self, in_channels: int, out_channels: int, kernel_size, stride=1, padding=0, dilation=1, bias: bool=Truepython/vkml/nn.py:670

Forward

forward

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

Internals

__repr__

def __repr__self -> strpython/vkml/nn.py:697

See also conv2d, im2col, matmul, Conv1d, Module

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