Skip to main content

clika_runtime.nn.functional

Functional interface to the neural-network operators::

import clika_runtime.nn.functional as F

y = F.relu(x)
p = F.softmax(y, dim=-1)

Use these when a computation has no state worth holding in a :class:~clika_runtime.nn.Module: activations, padding, pooling, normalization, losses, attention. Every function takes its input tensor first and returns a new tensor; a trailing-underscore twin (F.relu_) writes through its input instead of allocating. __all__ lists every available name.

NameKind

| functions | module functions |