Skip to main content

clika_runtime.nn.functional functions

adaptive_avg_pool​

adaptive_avg_pool(*args, **kwargs)

adaptive_avg_pool(input: clika_runtime._core.Tensor, output_size: collections.abc.Sequence[int]) -> clika_runtime._core.Tensor

adaptive_avg_pool(input, output_size) -> Tensor

The adaptive_avg_pool operator.

adaptive_avg_pool1d​

adaptive_avg_pool1d(input: 'Tensor', output_size: 'int | Sequence[int]') -> 'Tensor'

adaptive_avg_pool1d(input, output_size) -> Tensor

Average pooling to a fixed output length over channels-last [batch, length, channels].

adaptive_avg_pool2d​

adaptive_avg_pool2d(input: 'Tensor', output_size: 'int | Sequence[int]') -> 'Tensor'

adaptive_avg_pool2d(input, output_size) -> Tensor

Average pooling to a fixed [height, width] over channels-last input; an int means a square output.

adaptive_avg_pool3d​

adaptive_avg_pool3d(input: 'Tensor', output_size: 'int | Sequence[int]') -> 'Tensor'

adaptive_avg_pool3d(input, output_size) -> Tensor

Average pooling to a fixed [depth, height, width] over channels-last input; an int means a cubic output.

adaptive_max_pool​

adaptive_max_pool(*args, **kwargs)

adaptive_max_pool(input: clika_runtime._core.Tensor, output_size: collections.abc.Sequence[int]) -> clika_runtime._core.Tensor

adaptive_max_pool(input, output_size) -> Tensor

The adaptive_max_pool operator.

adaptive_max_pool1d​

adaptive_max_pool1d(input: 'Tensor', output_size: 'int | Sequence[int]') -> 'Tensor'

adaptive_max_pool1d(input, output_size) -> Tensor

Max pooling to a fixed output length over channels-last input.

adaptive_max_pool2d​

adaptive_max_pool2d(input: 'Tensor', output_size: 'int | Sequence[int]') -> 'Tensor'

adaptive_max_pool2d(input, output_size) -> Tensor

Max pooling to a fixed [height, width] over channels-last input; an int means a square output.

adaptive_max_pool3d​

adaptive_max_pool3d(input: 'Tensor', output_size: 'int | Sequence[int]') -> 'Tensor'

adaptive_max_pool3d(input, output_size) -> Tensor

Max pooling to a fixed [depth, height, width] over channels-last input; an int means a cubic output.

add_layer_norm​

add_layer_norm(*args, **kwargs)

add_layer_norm(input: clika_runtime._core.Tensor, residual: clika_runtime._core.Tensor | None = None, post_residual: clika_runtime._core.Tensor | None = None, normalized_shape: collections.abc.Sequence[int] = [], skip_bias: clika_runtime._core.Tensor | None = None, weight: clika_runtime._core.Tensor | None = None, bias: clika_runtime._core.Tensor | None = None, eps: float | None = None, *, activation: object | None = None) -> tuple[clika_runtime._core.Tensor, clika_runtime._core.Tensor]

add_layer_norm(input, residual=None, post_residual=None, normalized_shape=[], skip_bias=None, weight=None, bias=None, eps=None, *, activation=None) -> tuple[Tensor, Tensor]

The add_layer_norm operator.

add_rms_norm​

add_rms_norm(*args, **kwargs)

add_rms_norm(input: clika_runtime._core.Tensor, residual: clika_runtime._core.Tensor | None = None, residual2: clika_runtime._core.Tensor | None = None, post_residual: clika_runtime._core.Tensor | None = None, normalized_shape: collections.abc.Sequence[int] = [], skip_bias: clika_runtime._core.Tensor | None = None, weight: clika_runtime._core.Tensor | None = None, bias: clika_runtime._core.Tensor | None = None, eps: float | None = None, *, activation: object | None = None) -> tuple[clika_runtime._core.Tensor, clika_runtime._core.Tensor]

add_rms_norm(input, residual=None, residual2=None, post_residual=None, normalized_shape=[], skip_bias=None, weight=None, bias=None, eps=None, *, activation=None) -> tuple[Tensor, Tensor]

The add_rms_norm operator.

affine_grid​

affine_grid(theta: 'Tensor', size: 'Sequence[int]', align_corners: 'bool | None' = None) -> 'Tensor'

affine_grid(theta, size, align_corners=None) -> Tensor

The sampling grid grid_sample reads for the affine maps theta ([N, 2, 3] for a 2-d output, [N, 3, 4] for a 3-d one), over an output of size = (N, C, H, W) or (N, C, D, H, W): normalized coordinates in [-1, 1] per output position, shaped [N, H, W, 2] or [N, D, H, W, 3].

alpha_dropout​

alpha_dropout(input: 'Tensor', p: 'float' = 0.5, training: 'bool' = False, inplace: 'bool' = False) -> 'Tensor'

alpha_dropout(input, p=0.5, training=False, inplace=False) -> Tensor

The self-normalizing dropout that keeps the mean and variance of a SELU activation: a dropped element takes the saturation value and the result is rescaled and shifted, while training is True; otherwise the identity.

avg_pool​

avg_pool(*args, **kwargs)

avg_pool(input: clika_runtime._core.Tensor, kernel_size: collections.abc.Sequence[int], stride: collections.abc.Sequence[int], padding: collections.abc.Sequence[int], ceil_mode: bool, count_include_pad: bool, divisor_override: int | None) -> clika_runtime._core.Tensor

avg_pool(input, kernel_size, stride, padding, ceil_mode, count_include_pad, divisor_override) -> Tensor

The avg_pool operator.

avg_pool1d​

avg_pool1d(input: 'Tensor', kernel_size: 'int | Sequence[int]', stride: 'int | Sequence[int] | None' = None, padding: 'int | Sequence[int]' = 0, ceil_mode: 'bool' = False, count_include_pad: 'bool' = True) -> 'Tensor'

avg_pool1d(input, kernel_size, stride=None, padding=0, ceil_mode=False, count_include_pad=True) -> Tensor

1-d average pooling over channels-last [batch, length, channels]; stride=None means the kernel size.

avg_pool2d​

avg_pool2d(input: 'Tensor', kernel_size: 'int | Sequence[int]', stride: 'int | Sequence[int] | None' = None, padding: 'int | Sequence[int]' = 0, ceil_mode: 'bool' = False, count_include_pad: 'bool' = True, divisor_override: 'int | None' = None) -> 'Tensor'

avg_pool2d(input, kernel_size, stride=None, padding=0, ceil_mode=False, count_include_pad=True, divisor_override=None) -> Tensor

2-d average pooling over channels-last [batch, height, width, channels]; stride=None means the kernel size; divisor_override replaces the window count as the divisor.

avg_pool3d​

avg_pool3d(input: 'Tensor', kernel_size: 'int | Sequence[int]', stride: 'int | Sequence[int] | None' = None, padding: 'int | Sequence[int]' = 0, ceil_mode: 'bool' = False, count_include_pad: 'bool' = True, divisor_override: 'int | None' = None) -> 'Tensor'

avg_pool3d(input, kernel_size, stride=None, padding=0, ceil_mode=False, count_include_pad=True, divisor_override=None) -> Tensor

3-d average pooling over channels-last [batch, depth, height, width, channels]; stride=None means the kernel size.

batch_norm​

batch_norm(*args, **kwargs)

batch_norm(input: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor | None = None, bias: clika_runtime._core.Tensor | None = None, running_mean: clika_runtime._core.Tensor | None = None, running_var: clika_runtime._core.Tensor | None = None, eps: float | None = None, *, activation: object | None = None) -> clika_runtime._core.Tensor

batch_norm(input, weight=None, bias=None, running_mean=None, running_var=None, eps=None, *, activation=None) -> Tensor

The batch_norm operator.

bilinear​

bilinear(input1: 'Tensor', input2: 'Tensor', weight: 'Tensor', bias: 'Tensor | None' = None) -> 'Tensor'

bilinear(input1, input2, weight, bias=None) -> Tensor

y = x1^T W x2 + b with weight [out, in1, in2]: every leading dimension of the inputs is a batch dimension.

binary_cross_entropy​

binary_cross_entropy(*args, **kwargs)

binary_cross_entropy(input: clika_runtime._core.Tensor, target: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor | None = None, reduction: object = 'mean') -> clika_runtime._core.Tensor

binary_cross_entropy(input, target, weight=None, reduction='mean') -> Tensor

The binary_cross_entropy operator.

binary_cross_entropy_with_logits​

binary_cross_entropy_with_logits(*args, **kwargs)

binary_cross_entropy_with_logits(input: clika_runtime._core.Tensor, target: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor | None = None, reduction: object = 'mean', pos_weight: clika_runtime._core.Tensor | None = None) -> clika_runtime._core.Tensor

binary_cross_entropy_with_logits(input, target, weight=None, reduction='mean', pos_weight=None) -> Tensor

The binary_cross_entropy_with_logits operator.

celu​

celu(*args, **kwargs)

celu(input: clika_runtime._core.Tensor, alpha: float = 1.0) -> clika_runtime._core.Tensor

celu(input, alpha=1.0) -> Tensor

The celu operator.

celu_​

celu_(*args, **kwargs)

celu_(self: clika_runtime._core.Tensor, alpha: float = 1.0) -> clika_runtime._core.Tensor

celu_(self, alpha=1.0) -> Tensor

The celu_ operator.

channel_shuffle​

channel_shuffle(input: 'Tensor', groups: 'int') -> 'Tensor'

channel_shuffle(input, groups) -> Tensor

Interleave the channels of groups groups: channel g * (C // groups) + i moves to i * groups + g (the channel axis is the last one).

circular_pad​

circular_pad(*args, **kwargs)

circular_pad(input: clika_runtime._core.Tensor, pad: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor]) -> clika_runtime._core.Tensor

circular_pad(input, pad) -> Tensor

The circular_pad operator.

constant_pad​

constant_pad(*args, **kwargs)

constant_pad(input: clika_runtime._core.Tensor, pad: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor], value: clika_runtime._core.ops.ScalarOrTensor | None = None) -> clika_runtime._core.Tensor

constant_pad(input, pad, value=None) -> Tensor

The constant_pad operator.

conv​

conv(*args, **kwargs)

conv(input: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor, bias: clika_runtime._core.Tensor | None, stride: collections.abc.Sequence[int], padding: collections.abc.Sequence[int], dilation: collections.abc.Sequence[int], groups: int, mode: object = 'constant', value: float | None = None, *, activation: object | None = 'identity') -> clika_runtime._core.Tensor

conv(input, weight, bias, stride, padding, dilation, groups, mode='constant', value=None, *, activation='identity') -> Tensor

The conv operator.

conv1d​

conv1d(*args, **kwargs)

conv1d(input: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor, bias: clika_runtime._core.Tensor | None = None, stride: collections.abc.Sequence[int] = [1], padding: collections.abc.Sequence[int] = [0], dilation: collections.abc.Sequence[int] = [1], groups: int = 1, *, activation: object | None = 'identity') -> clika_runtime._core.Tensor

conv1d(input, weight, bias=None, stride=[1], padding=[0], dilation=[1], groups=1, *, activation='identity') -> Tensor

The conv1d operator.

conv2d​

conv2d(*args, **kwargs)

conv2d(input: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor, bias: clika_runtime._core.Tensor | None = None, stride: collections.abc.Sequence[int] = [1, 1], padding: collections.abc.Sequence[int] = [0, 0], dilation: collections.abc.Sequence[int] = [1, 1], groups: int = 1, *, activation: object | None = 'identity') -> clika_runtime._core.Tensor

conv2d(input, weight, bias=None, stride=[1, 1], padding=[0, 0], dilation=[1, 1], groups=1, *, activation='identity') -> Tensor

The conv2d operator.

conv3d​

conv3d(*args, **kwargs)

conv3d(input: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor, bias: clika_runtime._core.Tensor | None = None, stride: collections.abc.Sequence[int] = [1, 1, 1], padding: collections.abc.Sequence[int] = [0, 0, 0], dilation: collections.abc.Sequence[int] = [1, 1, 1], groups: int = 1, *, activation: object | None = 'identity') -> clika_runtime._core.Tensor

conv3d(input, weight, bias=None, stride=[1, 1, 1], padding=[0, 0, 0], dilation=[1, 1, 1], groups=1, *, activation='identity') -> Tensor

The conv3d operator.

conv_transpose​

conv_transpose(*args, **kwargs)

conv_transpose(input: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor, bias: clika_runtime._core.Tensor | None, stride: collections.abc.Sequence[int], padding: collections.abc.Sequence[int], output_padding: collections.abc.Sequence[int], groups: int, dilation: collections.abc.Sequence[int], *, activation: object | None = 'identity') -> clika_runtime._core.Tensor

conv_transpose(input, weight, bias, stride, padding, output_padding, groups, dilation, *, activation='identity') -> Tensor

The conv_transpose operator.

conv_transpose1d​

conv_transpose1d(*args, **kwargs)

conv_transpose1d(input: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor, bias: clika_runtime._core.Tensor | None = None, stride: collections.abc.Sequence[int] = [1], padding: collections.abc.Sequence[int] = [0, 0], output_padding: collections.abc.Sequence[int] = [0], groups: int = 1, dilation: collections.abc.Sequence[int] = [1], *, activation: object | None = 'identity') -> clika_runtime._core.Tensor

conv_transpose1d(input, weight, bias=None, stride=[1], padding=[0, 0], output_padding=[0], groups=1, dilation=[1], *, activation='identity') -> Tensor

The conv_transpose1d operator.

conv_transpose2d​

conv_transpose2d(*args, **kwargs)

conv_transpose2d(input: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor, bias: clika_runtime._core.Tensor | None = None, stride: collections.abc.Sequence[int] = [1, 1], padding: collections.abc.Sequence[int] = [0, 0, 0, 0], output_padding: collections.abc.Sequence[int] = [0, 0], groups: int = 1, dilation: collections.abc.Sequence[int] = [1, 1], *, activation: object | None = 'identity') -> clika_runtime._core.Tensor

conv_transpose2d(input, weight, bias=None, stride=[1, 1], padding=[0, 0, 0, 0], output_padding=[0, 0], groups=1, dilation=[1, 1], *, activation='identity') -> Tensor

The conv_transpose2d operator.

conv_transpose3d​

conv_transpose3d(*args, **kwargs)

conv_transpose3d(input: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor, bias: clika_runtime._core.Tensor | None = None, stride: collections.abc.Sequence[int] = [1, 1, 1], padding: collections.abc.Sequence[int] = [0, 0, 0, 0, 0, 0], output_padding: collections.abc.Sequence[int] = [0, 0, 0], groups: int = 1, dilation: collections.abc.Sequence[int] = [1, 1, 1], *, activation: object | None = 'identity') -> clika_runtime._core.Tensor

conv_transpose3d(input, weight, bias=None, stride=[1, 1, 1], padding=[0, 0, 0, 0, 0, 0], output_padding=[0, 0, 0], groups=1, dilation=[1, 1, 1], *, activation='identity') -> Tensor

The conv_transpose3d operator.

cosine_embedding_loss​

cosine_embedding_loss(input1: 'Tensor', input2: 'Tensor', target: 'Tensor', margin: 'float' = 0.0, reduction: 'Reduction' = 'mean') -> 'Tensor'

cosine_embedding_loss(input1, input2, target, margin=0.0, reduction="mean") -> Tensor

1 - cos(x1, x2) where target == 1, max(0, cos(x1, x2) - margin) where target == -1; then the reduction.

cosine_similarity​

cosine_similarity(x1: 'Tensor', x2: 'Tensor', dim: 'int' = 1, eps: 'float' = 1e-08) -> 'Tensor'

cosine_similarity(x1, x2, dim=1, eps=1e-8) -> Tensor

x1 . x2 / max(||x1|| ||x2||, eps) along dim.

cross_entropy​

cross_entropy(*args, **kwargs)

cross_entropy(input: clika_runtime._core.Tensor, target: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor | None = None, ignore_index: int | None = None, reduction: object = 'mean') -> clika_runtime._core.Tensor

cross_entropy(input, target, weight=None, ignore_index=None, reduction='mean') -> Tensor

The cross_entropy operator.

dropout​

dropout(input: 'Tensor', p: 'float' = 0.5, training: 'bool' = True, inplace: 'bool' = False) -> 'Tensor'

dropout(input, p=0.5, training=True, inplace=False) -> Tensor

Zero each element with probability p and scale the rest by 1 / (1 - p) while training is True; otherwise the input passes through unchanged. inplace=True writes the result into input.

dropout1d​

dropout1d(input: 'Tensor', p: 'float' = 0.5, training: 'bool' = True, inplace: 'bool' = False) -> 'Tensor'

dropout1d(input, p=0.5, training=True, inplace=False) -> Tensor

Channel-wise dropout for 1-d signals laid out channels-last, (N, L, C) or (L, C): whole channels are zeroed with probability p and the rest scaled by 1 / (1 - p) while training is True; otherwise the identity.

dropout2d​

dropout2d(input: 'Tensor', p: 'float' = 0.5, training: 'bool' = True, inplace: 'bool' = False) -> 'Tensor'

dropout2d(input, p=0.5, training=True, inplace=False) -> Tensor

Channel-wise dropout for 2-d feature maps laid out channels-last, (N, H, W, C) or (H, W, C): whole channels are zeroed with probability p and the rest scaled by 1 / (1 - p) while training is True; otherwise the identity.

dropout3d​

dropout3d(input: 'Tensor', p: 'float' = 0.5, training: 'bool' = True, inplace: 'bool' = False) -> 'Tensor'

dropout3d(input, p=0.5, training=True, inplace=False) -> Tensor

Channel-wise dropout for 3-d feature maps laid out channels-last, (N, D, H, W, C) or (D, H, W, C): whole channels are zeroed with probability p and the rest scaled by 1 / (1 - p) while training is True; otherwise the identity.

elu​

elu(*args, **kwargs)

elu(input: clika_runtime._core.Tensor, alpha: float = 1.0, scale: float = 1.0, input_scale: float = 1.0) -> clika_runtime._core.Tensor

elu(input, alpha=1.0, scale=1.0, input_scale=1.0) -> Tensor

The elu operator.

elu_​

elu_(*args, **kwargs)

elu_(self: clika_runtime._core.Tensor, alpha: float = 1.0, scale: float = 1.0, input_scale: float = 1.0) -> clika_runtime._core.Tensor

elu_(self, alpha=1.0, scale=1.0, input_scale=1.0) -> Tensor

The elu_ operator.

embedding​

embedding(*args, **kwargs)

embedding(indices: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor, bias: clika_runtime._core.Tensor | None = None, *, activation: object | None = None) -> clika_runtime._core.Tensor

embedding(indices, weight, bias=None, *, activation=None) -> Tensor

The embedding operator.

fast_gelu​

fast_gelu(*args, **kwargs)

fast_gelu(input: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

fast_gelu(input) -> Tensor

The fast_gelu operator.

feature_alpha_dropout​

feature_alpha_dropout(input: 'Tensor', p: 'float' = 0.5, training: 'bool' = False, inplace: 'bool' = False) -> 'Tensor'

feature_alpha_dropout(input, p=0.5, training=False, inplace=False) -> Tensor

Channel-wise alpha dropout over a channels-last input (the channel is the last dim; every dim between the leading batch dim and it is spatial): whole channels take the saturation value with probability p and the result is rescaled and shifted, while training is True; otherwise the identity.

fold​

fold(*args, **kwargs)

fold(input: clika_runtime._core.Tensor, output_size: collections.abc.Sequence[int], kernel_size: collections.abc.Sequence[int], dilation: collections.abc.Sequence[int] = [], padding: collections.abc.Sequence[int] = [], stride: collections.abc.Sequence[int] = [], mode: object = 'constant', value: float | None = None) -> clika_runtime._core.Tensor

fold(input, output_size, kernel_size, dilation=[], padding=[], stride=[], mode='constant', value=None) -> Tensor

The fold operator.

gated_rms_norm​

gated_rms_norm(*args, **kwargs)

gated_rms_norm(input: clika_runtime._core.Tensor, gate: clika_runtime._core.Tensor, normalized_shape: collections.abc.Sequence[int], weight: clika_runtime._core.Tensor | None = None, eps: float | None = None) -> clika_runtime._core.Tensor

gated_rms_norm(input, gate, normalized_shape, weight=None, eps=None) -> Tensor

The gated_rms_norm operator.

gaussian_nll_loss​

gaussian_nll_loss(input: 'Tensor', target: 'Tensor', var: 'Tensor', full: 'bool' = False, eps: 'float' = 1e-06, reduction: 'Reduction' = 'mean') -> 'Tensor'

gaussian_nll_loss(input, target, var, full=False, eps=1e-6, reduction="mean") -> Tensor

0.5 * (log(max(var, eps)) + (input - target)^2 / max(var, eps)), plus 0.5 * log(2 pi) with full=True; then the reduction.

geglu​

geglu(*args, **kwargs)

geglu(input: clika_runtime._core.Tensor, approximate: object | None = 'none') -> clika_runtime._core.Tensor

geglu(input, approximate='none') -> Tensor

The geglu operator.

gelu​

gelu(*args, **kwargs)

gelu(input: clika_runtime._core.Tensor, approximate: object | None = 'none') -> clika_runtime._core.Tensor

gelu(input, approximate='none') -> Tensor

The gelu operator.

gelu_​

gelu_(*args, **kwargs)

gelu_(self: clika_runtime._core.Tensor, approximate: object | None = 'none') -> clika_runtime._core.Tensor

gelu_(self, approximate='none') -> Tensor

The gelu_ operator.

glu​

glu(*args, **kwargs)

glu(input: clika_runtime._core.Tensor, dim: int = -1) -> clika_runtime._core.Tensor

glu(input, dim=-1) -> Tensor

The glu operator.

grid_sample​

grid_sample(*args, **kwargs)

grid_sample(input: clika_runtime._core.Tensor, grid: clika_runtime._core.Tensor, mode: object = 'bilinear', padding_mode: object = 'zeros', align_corners: bool = False) -> clika_runtime._core.Tensor

grid_sample(input, grid, mode='bilinear', padding_mode='zeros', align_corners=False) -> Tensor

The grid_sample operator.

group_norm​

group_norm(*args, **kwargs)

group_norm(input: clika_runtime._core.Tensor, num_groups: int, weight: clika_runtime._core.Tensor | None = None, bias: clika_runtime._core.Tensor | None = None, running_mean: clika_runtime._core.Tensor | None = None, running_var: clika_runtime._core.Tensor | None = None, eps: float | None = None, *, activation: object | None = None) -> clika_runtime._core.Tensor

group_norm(input, num_groups, weight=None, bias=None, running_mean=None, running_var=None, eps=None, *, activation=None) -> Tensor

The group_norm operator.

gumbel_softmax​

gumbel_softmax(logits: 'Tensor', tau: 'float' = 1.0, hard: 'bool' = False, eps: 'float' = 1e-10, dim: 'int' = -1) -> 'Tensor'

gumbel_softmax(logits, tau=1.0, hard=False, eps=1e-10, dim=-1) -> Tensor

A sample from the Gumbel-softmax distribution: softmax((logits + g) / tau) with g standard Gumbel noise. hard=True returns the one-hot argmax of that sample instead.

hardshrink​

hardshrink(*args, **kwargs)

hardshrink(input: clika_runtime._core.Tensor, lambd: float = 0.5) -> clika_runtime._core.Tensor

hardshrink(input, lambd=0.5) -> Tensor

The hardshrink operator.

hardshrink_​

hardshrink_(*args, **kwargs)

hardshrink_(self: clika_runtime._core.Tensor, lambd: float = 0.5) -> clika_runtime._core.Tensor

hardshrink_(self, lambd=0.5) -> Tensor

The hardshrink_ operator.

hardsigmoid​

hardsigmoid(*args, **kwargs)

hardsigmoid(input: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

hardsigmoid(input) -> Tensor

The hardsigmoid operator.

hardsigmoid_​

hardsigmoid_(*args, **kwargs)

hardsigmoid_(self: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

hardsigmoid_(self) -> Tensor

The hardsigmoid_ operator.

hardswish​

hardswish(*args, **kwargs)

hardswish(input: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

hardswish(input) -> Tensor

The hardswish operator.

hardswish_​

hardswish_(*args, **kwargs)

hardswish_(self: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

hardswish_(self) -> Tensor

The hardswish_ operator.

hardtanh​

hardtanh(*args, **kwargs)

hardtanh(input: clika_runtime._core.Tensor, min_val: float = -1.0, max_val: float = 1.0) -> clika_runtime._core.Tensor

hardtanh(input, min_val=-1.0, max_val=1.0) -> Tensor

The hardtanh operator.

hardtanh_​

hardtanh_(*args, **kwargs)

hardtanh_(self: clika_runtime._core.Tensor, min_val: float = -1.0, max_val: float = 1.0) -> clika_runtime._core.Tensor

hardtanh_(self, min_val=-1.0, max_val=1.0) -> Tensor

The hardtanh_ operator.

hinge_embedding_loss​

hinge_embedding_loss(input: 'Tensor', target: 'Tensor', margin: 'float' = 1.0, reduction: 'Reduction' = 'mean') -> 'Tensor'

hinge_embedding_loss(input, target, margin=1.0, reduction="mean") -> Tensor

input where target == 1, max(0, margin - input) where target == -1; then the reduction.

huber_loss​

huber_loss(*args, **kwargs)

huber_loss(input: clika_runtime._core.Tensor, target: clika_runtime._core.Tensor, reduction: object = 'mean', delta: float = 1.0) -> clika_runtime._core.Tensor

huber_loss(input, target, reduction='mean', delta=1.0) -> Tensor

The huber_loss operator.

instance_norm​

instance_norm(*args, **kwargs)

instance_norm(input: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor | None = None, bias: clika_runtime._core.Tensor | None = None, running_mean: clika_runtime._core.Tensor | None = None, running_var: clika_runtime._core.Tensor | None = None, eps: float | None = None, *, activation: object | None = None) -> clika_runtime._core.Tensor

instance_norm(input, weight=None, bias=None, running_mean=None, running_var=None, eps=None, *, activation=None) -> Tensor

The instance_norm operator.

interpolate​

interpolate(input: 'Tensor', size: 'int | Sequence[int] | None' = None, scale_factor: 'float | Sequence[float] | None' = None, mode: 'InterpolationMode' = 'nearest', align_corners: 'bool | None' = None, recompute_scale_factor: 'bool | None' = None, antialias: 'bool' = False) -> 'Tensor'

interpolate(input, size=None, scale_factor=None, mode="nearest", align_corners=None, recompute_scale_factor=None, antialias=False) -> Tensor

Resample the spatial dimensions of channels-last [batch, *spatial, channels] input to size OR by scale_factor (exactly one). The rank picks the variant, so "linear", "bilinear" and "trilinear" name the same interpolation; "nearest", "nearest-exact", "bicubic" and "area" are the others.

kl_div​

kl_div(*args, **kwargs)

kl_div(input: clika_runtime._core.Tensor, target: clika_runtime._core.Tensor, reduction: object = 'mean', log_target: bool = False) -> clika_runtime._core.Tensor

kl_div(input, target, reduction='mean', log_target=False) -> Tensor

The kl_div operator.

l1_loss​

l1_loss(*args, **kwargs)

l1_loss(input: clika_runtime._core.Tensor, target: clika_runtime._core.Tensor, reduction: object = 'mean') -> clika_runtime._core.Tensor

l1_loss(input, target, reduction='mean') -> Tensor

The l1_loss operator.

layer_norm​

layer_norm(*args, **kwargs)

layer_norm(input: clika_runtime._core.Tensor, normalized_shape: collections.abc.Sequence[int], weight: clika_runtime._core.Tensor | None = None, bias: clika_runtime._core.Tensor | None = None, eps: float | None = None, *, activation: object | None = None) -> clika_runtime._core.Tensor

layer_norm(input, normalized_shape, weight=None, bias=None, eps=None, *, activation=None) -> Tensor

The layer_norm operator.

leaky_relu​

leaky_relu(*args, **kwargs)

leaky_relu(input: clika_runtime._core.Tensor, negative_slope: float = 0.01) -> clika_runtime._core.Tensor

leaky_relu(input, negative_slope=0.01) -> Tensor

The leaky_relu operator.

leaky_relu_​

leaky_relu_(*args, **kwargs)

leaky_relu_(self: clika_runtime._core.Tensor, negative_slope: float = 0.01) -> clika_runtime._core.Tensor

leaky_relu_(self, negative_slope=0.01) -> Tensor

The leaky_relu_ operator.

linear​

linear(*args, **kwargs)

linear(input: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor, bias: clika_runtime._core.Tensor | None = None, *, activation: object | None = None, situ_beta: float = 0.0, situ_linear_beta: float = 0.0) -> clika_runtime._core.Tensor

linear(input, weight, bias=None, *, activation=None, situ_beta=0.0, situ_linear_beta=0.0) -> Tensor

The linear operator.

local_response_norm​

local_response_norm(input: 'Tensor', size: 'int', alpha: 'float' = 0.0001, beta: 'float' = 0.75, k: 'float' = 1.0) -> 'Tensor'

local_response_norm(input, size, alpha=1e-4, beta=0.75, k=1.0) -> Tensor

x / (k + alpha * sum_{neighbors} x^2) ** beta with the sum over a window of size channels centered on each channel (the channel axis is the last one).

log_sigmoid​

log_sigmoid(*args, **kwargs)

log_sigmoid(input: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

log_sigmoid(input) -> Tensor

The log_sigmoid operator.

log_sigmoid_​

log_sigmoid_(*args, **kwargs)

log_sigmoid_(self: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

log_sigmoid_(self) -> Tensor

The log_sigmoid_ operator.

log_softmax​

log_softmax(*args, **kwargs)

log_softmax(input: clika_runtime._core.Tensor, dim: int = -1, *, dtype: clika_runtime._core.DataType = DataType.Undefined) -> clika_runtime._core.Tensor

log_softmax(input, dim=-1, *, dtype=Undefined) -> Tensor

The log_softmax operator.

log_softmax_​

log_softmax_(*args, **kwargs)

log_softmax_(self: clika_runtime._core.Tensor, dim: int = -1) -> clika_runtime._core.Tensor

log_softmax_(self, dim=-1) -> Tensor

The log_softmax_ operator.

logit​

logit(*args, **kwargs)

logit(input: clika_runtime._core.Tensor, eps: float | None = None) -> clika_runtime._core.Tensor

logit(input, eps=None) -> Tensor

The logit operator.

logit_​

logit_(*args, **kwargs)

logit_(self: clika_runtime._core.Tensor, eps: float | None = None) -> clika_runtime._core.Tensor

logit_(self, eps=None) -> Tensor

The logit_ operator.

logsigmoid​

logsigmoid(input: 'Tensor') -> 'Tensor'

logsigmoid(input) -> Tensor

log(1 / (1 + exp(-x))), element-wise (the log_sigmoid operator under its other spelling).

lp_pool1d​

lp_pool1d(input: 'Tensor', norm_type: 'float', kernel_size: 'int | Sequence[int]', stride: 'int | Sequence[int] | None' = None, ceil_mode: 'bool' = False) -> 'Tensor'

lp_pool1d(input, norm_type, kernel_size, stride=None, ceil_mode=False) -> Tensor

Power-average pooling: the p-norm of each window (sum(x ** p) ** (1 / p)) over channels-last [batch, length, channels].

lp_pool2d​

lp_pool2d(input: 'Tensor', norm_type: 'float', kernel_size: 'int | Sequence[int]', stride: 'int | Sequence[int] | None' = None, ceil_mode: 'bool' = False) -> 'Tensor'

lp_pool2d(input, norm_type, kernel_size, stride=None, ceil_mode=False) -> Tensor

Power-average pooling over channels-last [batch, height, width, channels].

lp_pool3d​

lp_pool3d(input: 'Tensor', norm_type: 'float', kernel_size: 'int | Sequence[int]', stride: 'int | Sequence[int] | None' = None, ceil_mode: 'bool' = False) -> 'Tensor'

lp_pool3d(input, norm_type, kernel_size, stride=None, ceil_mode=False) -> Tensor

Power-average pooling over channels-last [batch, depth, height, width, channels].

margin_ranking_loss​

margin_ranking_loss(input1: 'Tensor', input2: 'Tensor', target: 'Tensor', margin: 'float' = 0.0, reduction: 'Reduction' = 'mean') -> 'Tensor'

margin_ranking_loss(input1, input2, target, margin=0.0, reduction="mean") -> Tensor

max(0, -target * (input1 - input2) + margin); then the reduction.

max_pool​

max_pool(*args, **kwargs)

max_pool(input: clika_runtime._core.Tensor, kernel_size: collections.abc.Sequence[int], stride: collections.abc.Sequence[int], padding: collections.abc.Sequence[int], dilation: collections.abc.Sequence[int], ceil_mode: bool) -> clika_runtime._core.Tensor

max_pool(input, kernel_size, stride, padding, dilation, ceil_mode) -> Tensor

The max_pool operator.

max_pool1d​

max_pool1d(input: 'Tensor', kernel_size: 'int | Sequence[int]', stride: 'int | Sequence[int] | None' = None, padding: 'int | Sequence[int]' = 0, dilation: 'int | Sequence[int]' = 1, ceil_mode: 'bool' = False, return_indices: 'bool' = False) -> 'Tensor | tuple[Tensor, Tensor]'

max_pool1d(input, kernel_size, stride=None, padding=0, dilation=1, ceil_mode=False, return_indices=False) -> Tensor | (Tensor, Tensor)

1-d max pooling over channels-last [batch, length, channels]; stride=None means the kernel size. return_indices=True also returns the flat window-argmax indices.

max_pool1d_with_indices​

max_pool1d_with_indices(*args, **kwargs)

max_pool1d_with_indices(input: clika_runtime._core.Tensor, kernel_size: collections.abc.Sequence[int], stride: collections.abc.Sequence[int] = [], padding: collections.abc.Sequence[int] = [0], dilation: collections.abc.Sequence[int] = [1], ceil_mode: bool = False) -> tuple[clika_runtime._core.Tensor, clika_runtime._core.Tensor]

max_pool1d_with_indices(input, kernel_size, stride=[], padding=[0], dilation=[1], ceil_mode=False) -> tuple[Tensor, Tensor]

The max_pool1d_with_indices operator.

max_pool2d​

max_pool2d(input: 'Tensor', kernel_size: 'int | Sequence[int]', stride: 'int | Sequence[int] | None' = None, padding: 'int | Sequence[int]' = 0, dilation: 'int | Sequence[int]' = 1, ceil_mode: 'bool' = False, return_indices: 'bool' = False) -> 'Tensor | tuple[Tensor, Tensor]'

max_pool2d(input, kernel_size, stride=None, padding=0, dilation=1, ceil_mode=False, return_indices=False) -> Tensor | (Tensor, Tensor)

2-d max pooling over channels-last [batch, height, width, channels]; stride=None means the kernel size. return_indices=True also returns the flat window-argmax indices.

max_pool2d_with_indices​

max_pool2d_with_indices(*args, **kwargs)

max_pool2d_with_indices(input: clika_runtime._core.Tensor, kernel_size: collections.abc.Sequence[int], stride: collections.abc.Sequence[int] = [], padding: collections.abc.Sequence[int] = [0, 0], dilation: collections.abc.Sequence[int] = [1, 1], ceil_mode: bool = False) -> tuple[clika_runtime._core.Tensor, clika_runtime._core.Tensor]

max_pool2d_with_indices(input, kernel_size, stride=[], padding=[0, 0], dilation=[1, 1], ceil_mode=False) -> tuple[Tensor, Tensor]

The max_pool2d_with_indices operator.

max_pool3d​

max_pool3d(input: 'Tensor', kernel_size: 'int | Sequence[int]', stride: 'int | Sequence[int] | None' = None, padding: 'int | Sequence[int]' = 0, dilation: 'int | Sequence[int]' = 1, ceil_mode: 'bool' = False, return_indices: 'bool' = False) -> 'Tensor | tuple[Tensor, Tensor]'

max_pool3d(input, kernel_size, stride=None, padding=0, dilation=1, ceil_mode=False, return_indices=False) -> Tensor | (Tensor, Tensor)

3-d max pooling over channels-last [batch, depth, height, width, channels]; stride=None means the kernel size. return_indices=True also returns the flat window-argmax indices.

max_pool3d_with_indices​

max_pool3d_with_indices(*args, **kwargs)

max_pool3d_with_indices(input: clika_runtime._core.Tensor, kernel_size: collections.abc.Sequence[int], stride: collections.abc.Sequence[int] = [], padding: collections.abc.Sequence[int] = [0, 0, 0], dilation: collections.abc.Sequence[int] = [1, 1, 1], ceil_mode: bool = False) -> tuple[clika_runtime._core.Tensor, clika_runtime._core.Tensor]

max_pool3d_with_indices(input, kernel_size, stride=[], padding=[0, 0, 0], dilation=[1, 1, 1], ceil_mode=False) -> tuple[Tensor, Tensor]

The max_pool3d_with_indices operator.

max_pool_with_indices​

max_pool_with_indices(*args, **kwargs)

max_pool_with_indices(input: clika_runtime._core.Tensor, kernel_size: collections.abc.Sequence[int], stride: collections.abc.Sequence[int], padding: collections.abc.Sequence[int], dilation: collections.abc.Sequence[int], ceil_mode: bool) -> tuple[clika_runtime._core.Tensor, clika_runtime._core.Tensor]

max_pool_with_indices(input, kernel_size, stride, padding, dilation, ceil_mode) -> tuple[Tensor, Tensor]

The max_pool_with_indices operator.

mish​

mish(*args, **kwargs)

mish(input: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

mish(input) -> Tensor

The mish operator.

mish_​

mish_(*args, **kwargs)

mish_(self: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

mish_(self) -> Tensor

The mish_ operator.

mse_loss​

mse_loss(*args, **kwargs)

mse_loss(input: clika_runtime._core.Tensor, target: clika_runtime._core.Tensor, reduction: object = 'mean') -> clika_runtime._core.Tensor

mse_loss(input, target, reduction='mean') -> Tensor

The mse_loss operator.

multilabel_soft_margin_loss​

multilabel_soft_margin_loss(input: 'Tensor', target: 'Tensor', weight: 'Tensor | None' = None, reduction: 'Reduction' = 'mean') -> 'Tensor'

multilabel_soft_margin_loss(input, target, weight=None, reduction="mean") -> Tensor

-(target * logsigmoid(input) + (1 - target) * logsigmoid(-input)) averaged over the class axis (the last one); then the reduction.

nll_loss​

nll_loss(*args, **kwargs)

nll_loss(input: clika_runtime._core.Tensor, target: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor | None = None, ignore_index: int | None = None, reduction: object = 'mean') -> clika_runtime._core.Tensor

nll_loss(input, target, weight=None, ignore_index=None, reduction='mean') -> Tensor

The nll_loss operator.

normalize​

normalize(input: 'Tensor', p: 'float' = 2.0, dim: 'int' = 1, eps: 'float' = 1e-12) -> 'Tensor'

normalize(input, p=2.0, dim=1, eps=1e-12) -> Tensor

x / max(||x||_p, eps) along dim.

normalize_​

normalize_(*args, **kwargs)

normalize_(self: clika_runtime._core.Tensor, p: clika_runtime._core.ops.Scalar = Scalar(...), dim: int = 1, eps: float | None = None) -> clika_runtime._core.Tensor

normalize_(self, p=2.0, dim=1, eps=None) -> Tensor

The normalize_ operator.

one_hot​

one_hot(tensor: 'Tensor', num_classes: 'int' = -1) -> 'Tensor'

one_hot(tensor, num_classes=-1) -> Tensor

The one-hot encoding of integer tensor as a trailing axis of num_classes; -1 reads the class count off the largest index (a value read that waits for the tensor).

pad​

pad(input: 'Tensor', pad: 'Sequence[int]', mode: "Literal['constant', 'reflect', 'replicate', 'circular']" = 'constant', value: 'float | None' = None) -> 'Tensor'

pad(input, pad, mode="constant", value=None) -> Tensor

Pad input by pad, read the way the reference framework reads it: (left, right) pairs from the LAST dimension backwards, so pad=(1, 1) pads the last dimension, pad=(1, 1, 2, 2) the last two, and a leading dimension the list does not reach stays as it is. The pairs are converted to the runtime's leading-axis-first order before the operator runs. mode is "constant" (filled with value, None meaning 0), "reflect", "replicate", or "circular"; a negative width crops that side.

pairwise_distance​

pairwise_distance(x1: 'Tensor', x2: 'Tensor', p: 'float' = 2.0, eps: 'float' = 1e-06, keepdim: 'bool' = False) -> 'Tensor'

pairwise_distance(x1, x2, p=2.0, eps=1e-6, keepdim=False) -> Tensor

||x1 - x2 + eps||_p along the last dimension.

pdist​

pdist(*args, **kwargs)

pdist(input: clika_runtime._core.Tensor, p: clika_runtime._core.ops.Scalar = Scalar(...)) -> clika_runtime._core.Tensor

pdist(input, p=2.0) -> Tensor

The pdist operator.

pixel_shuffle​

pixel_shuffle(*args, **kwargs)

pixel_shuffle(input: clika_runtime._core.Tensor, upscale_factor: int, mode: object = 'crd') -> clika_runtime._core.Tensor

pixel_shuffle(input, upscale_factor, mode='crd') -> Tensor

The pixel_shuffle operator.

pixel_unshuffle​

pixel_unshuffle(*args, **kwargs)

pixel_unshuffle(input: clika_runtime._core.Tensor, downscale_factor: int, mode: object = 'crd') -> clika_runtime._core.Tensor

pixel_unshuffle(input, downscale_factor, mode='crd') -> Tensor

The pixel_unshuffle operator.

poisson_nll_loss​

poisson_nll_loss(input: 'Tensor', target: 'Tensor', log_input: 'bool' = True, full: 'bool' = False, size_average: 'bool | None' = None, eps: 'float' = 1e-08, reduce: 'bool | None' = None, reduction: 'Reduction' = 'mean') -> 'Tensor'

poisson_nll_loss(input, target, log_input=True, full=False, eps=1e-8, reduction="mean") -> Tensor

exp(input) - target * input (log_input=True) or input - target * log(input + eps); full=True adds the Stirling term where target > 1; then the reduction.

prelu​

prelu(*args, **kwargs)

prelu(input: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor | None = None) -> clika_runtime._core.Tensor

prelu(input, weight=None) -> Tensor

The prelu operator.

prelu_​

prelu_(*args, **kwargs)

prelu_(self: clika_runtime._core.Tensor, weight: clika_runtime._core.Tensor | None = None) -> clika_runtime._core.Tensor

prelu_(self, weight=None) -> Tensor

The prelu_ operator.

reflect_pad​

reflect_pad(*args, **kwargs)

reflect_pad(input: clika_runtime._core.Tensor, pad: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor]) -> clika_runtime._core.Tensor

reflect_pad(input, pad) -> Tensor

The reflect_pad operator.

reglu​

reglu(*args, **kwargs)

reglu(input: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

reglu(input) -> Tensor

The reglu operator.

relu​

relu(*args, **kwargs)

relu(input: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

relu(input) -> Tensor

The relu operator.

relu6​

relu6(*args, **kwargs)

relu6(input: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

relu6(input) -> Tensor

The relu6 operator.

relu6_​

relu6_(*args, **kwargs)

relu6_(self: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

relu6_(self) -> Tensor

The relu6_ operator.

relu_​

relu_(*args, **kwargs)

relu_(self: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

relu_(self) -> Tensor

The relu_ operator.

replicate_pad​

replicate_pad(*args, **kwargs)

replicate_pad(input: clika_runtime._core.Tensor, pad: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor]) -> clika_runtime._core.Tensor

replicate_pad(input, pad) -> Tensor

The replicate_pad operator.

rms_norm​

rms_norm(*args, **kwargs)

rms_norm(input: clika_runtime._core.Tensor, normalized_shape: collections.abc.Sequence[int], weight: clika_runtime._core.Tensor | None = None, bias: clika_runtime._core.Tensor | None = None, eps: float | None = None, *, activation: object | None = None) -> clika_runtime._core.Tensor

rms_norm(input, normalized_shape, weight=None, bias=None, eps=None, *, activation=None) -> Tensor

The rms_norm operator.

rrelu​

rrelu(input: 'Tensor', lower: 'float' = 0.125, upper: 'float' = 0.3333333333333333, training: 'bool' = False, inplace: 'bool' = False) -> 'Tensor'

rrelu(input, lower=1/8, upper=1/3, training=False, inplace=False) -> Tensor

Randomized leaky ReLU: outside training the negative slope is the fixed (lower + upper) / 2; training=True draws it per element and raises RuntimeError here.

scaled_dot_product_attention​

scaled_dot_product_attention(query: 'Tensor', key: 'Tensor', value: 'Tensor', attn_mask: 'Tensor | None' = None, dropout_p: 'float' = 0.0, is_causal: 'bool' = False, scale: 'float | None' = None, enable_gqa: 'bool' = False) -> 'Tensor'

scaled_dot_product_attention(query, key, value, attn_mask=None, dropout_p=0.0, is_causal=False, scale=None, enable_gqa=False) -> Tensor

softmax(scale * q k^T + mask) v over head-major [batch, heads, seq, head_dim] tensors; scale=None means 1 / sqrt(head_dim); a boolean attn_mask keeps True positions, a floating one adds to the logits. Grouped key / value heads broadcast to their query group whichever way enable_gqa is set. dropout_p > 0 raises RuntimeError (this runtime serves inference).

scaled_dot_product_attention_varlen​

scaled_dot_product_attention_varlen(*args, **kwargs)

scaled_dot_product_attention_varlen(query: clika_runtime._core.Tensor, key: clika_runtime._core.Tensor, value: clika_runtime._core.Tensor, cu_seqlens_q: clika_runtime._core.Tensor, cu_seqlens_k: clika_runtime._core.Tensor, max_seqlen_q: clika_runtime._core.ops.ScalarOrTensor = ScalarOrTensor(...), max_seqlen_k: clika_runtime._core.ops.ScalarOrTensor = ScalarOrTensor(...), attn_mask: clika_runtime._core.Tensor | None = None, is_causal: bool = False, q_scale: clika_runtime._core.ops.ScalarOrTensor = ScalarOrTensor(...), k_scale: clika_runtime._core.ops.ScalarOrTensor = ScalarOrTensor(...), v_scale: clika_runtime._core.ops.ScalarOrTensor = ScalarOrTensor(...)) -> clika_runtime._core.Tensor

scaled_dot_product_attention_varlen(query, key, value, cu_seqlens_q, cu_seqlens_k, max_seqlen_q=None, max_seqlen_k=None, attn_mask=None, is_causal=False, q_scale=None, k_scale=None, v_scale=None) -> Tensor

The scaled_dot_product_attention_varlen operator.

selu​

selu(*args, **kwargs)

selu(input: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

selu(input) -> Tensor

The selu operator.

selu_​

selu_(*args, **kwargs)

selu_(self: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

selu_(self) -> Tensor

The selu_ operator.

sigmoid​

sigmoid(*args, **kwargs)

sigmoid(input: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

sigmoid(input) -> Tensor

The sigmoid operator.

sigmoid_​

sigmoid_(*args, **kwargs)

sigmoid_(self: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

sigmoid_(self) -> Tensor

The sigmoid_ operator.

silu​

silu(*args, **kwargs)

silu(input: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

silu(input) -> Tensor

The silu operator.

silu_​

silu_(*args, **kwargs)

silu_(self: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

silu_(self) -> Tensor

The silu_ operator.

smooth_l1_loss​

smooth_l1_loss(*args, **kwargs)

smooth_l1_loss(input: clika_runtime._core.Tensor, target: clika_runtime._core.Tensor, reduction: object = 'mean', beta: float = 1.0) -> clika_runtime._core.Tensor

smooth_l1_loss(input, target, reduction='mean', beta=1.0) -> Tensor

The smooth_l1_loss operator.

soft_margin_loss​

soft_margin_loss(input: 'Tensor', target: 'Tensor', reduction: 'Reduction' = 'mean') -> 'Tensor'

soft_margin_loss(input, target, reduction="mean") -> Tensor

log(1 + exp(-target * input)); then the reduction.

softmax​

softmax(*args, **kwargs)

softmax(input: clika_runtime._core.Tensor, dim: int = -1, *, dtype: clika_runtime._core.DataType = DataType.Undefined) -> clika_runtime._core.Tensor

softmax(input, dim=-1, *, dtype=Undefined) -> Tensor

The softmax operator.

softmax_​

softmax_(*args, **kwargs)

softmax_(self: clika_runtime._core.Tensor, dim: int = -1) -> clika_runtime._core.Tensor

softmax_(self, dim=-1) -> Tensor

The softmax_ operator.

softmin​

softmin(*args, **kwargs)

softmin(input: clika_runtime._core.Tensor, dim: int = -1, *, dtype: clika_runtime._core.DataType = DataType.Undefined) -> clika_runtime._core.Tensor

softmin(input, dim=-1, *, dtype=Undefined) -> Tensor

The softmin operator.

softmin_​

softmin_(*args, **kwargs)

softmin_(self: clika_runtime._core.Tensor, dim: int = -1) -> clika_runtime._core.Tensor

softmin_(self, dim=-1) -> Tensor

The softmin_ operator.

softplus​

softplus(*args, **kwargs)

softplus(input: clika_runtime._core.Tensor, beta: float = 1.0, threshold: float = 20.0) -> clika_runtime._core.Tensor

softplus(input, beta=1.0, threshold=20.0) -> Tensor

The softplus operator.

softplus_​

softplus_(*args, **kwargs)

softplus_(self: clika_runtime._core.Tensor, beta: float = 1.0, threshold: float = 20.0) -> clika_runtime._core.Tensor

softplus_(self, beta=1.0, threshold=20.0) -> Tensor

The softplus_ operator.

softshrink​

softshrink(*args, **kwargs)

softshrink(input: clika_runtime._core.Tensor, lambd: float = 0.5) -> clika_runtime._core.Tensor

softshrink(input, lambd=0.5) -> Tensor

The softshrink operator.

softshrink_​

softshrink_(*args, **kwargs)

softshrink_(self: clika_runtime._core.Tensor, lambd: float = 0.5) -> clika_runtime._core.Tensor

softshrink_(self, lambd=0.5) -> Tensor

The softshrink_ operator.

softsign​

softsign(*args, **kwargs)

softsign(input: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

softsign(input) -> Tensor

The softsign operator.

softsign_​

softsign_(*args, **kwargs)

softsign_(self: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

softsign_(self) -> Tensor

The softsign_ operator.

swiglu​

swiglu(*args, **kwargs)

swiglu(input: clika_runtime._core.Tensor, alpha: float = 1.0, beta: float = 0.0, limit: float = inf) -> clika_runtime._core.Tensor

swiglu(input, alpha=1.0, beta=0.0, limit=None) -> Tensor

The swiglu operator.

tanh​

tanh(*args, **kwargs)

tanh(input: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

tanh(input) -> Tensor

The tanh operator.

tanh_​

tanh_(*args, **kwargs)

tanh_(self: clika_runtime._core.Tensor) -> clika_runtime._core.Tensor

tanh_(self) -> Tensor

The tanh_ operator.

tanhshrink​

tanhshrink(input: 'Tensor') -> 'Tensor'

tanhshrink(input) -> Tensor

x - tanh(x), element-wise.

threshold​

threshold(*args, **kwargs)

threshold(input: clika_runtime._core.Tensor, threshold: float, value: float) -> clika_runtime._core.Tensor

threshold(input, threshold, value) -> Tensor

The threshold operator.

threshold_​

threshold_(*args, **kwargs)

threshold_(self: clika_runtime._core.Tensor, threshold: float, value: float) -> clika_runtime._core.Tensor

threshold_(self, threshold, value) -> Tensor

The threshold_ operator.

triplet_margin_loss​

triplet_margin_loss(anchor: 'Tensor', positive: 'Tensor', negative: 'Tensor', margin: 'float' = 1.0, p: 'float' = 2.0, eps: 'float' = 1e-06, swap: 'bool' = False, reduction: 'Reduction' = 'mean') -> 'Tensor'

triplet_margin_loss(anchor, positive, negative, margin=1.0, p=2.0, eps=1e-6, swap=False, reduction="mean") -> Tensor

max(0, d(a, p) - d(a, n) + margin) with d the p-norm distance; swap=True uses the smaller of d(a, n) and d(p, n); then the reduction.

unfold​

unfold(*args, **kwargs)

unfold(input: clika_runtime._core.Tensor, kernel_size: collections.abc.Sequence[int], dilation: collections.abc.Sequence[int] = [], padding: collections.abc.Sequence[int] = [], stride: collections.abc.Sequence[int] = [], mode: object = 'constant', value: float | None = None) -> clika_runtime._core.Tensor

unfold(input, kernel_size, dilation=[], padding=[], stride=[], mode='constant', value=None) -> Tensor

The unfold operator.

upsample​

upsample(input: 'Tensor', size: 'int | Sequence[int] | None' = None, scale_factor: 'float | Sequence[float] | None' = None, mode: 'InterpolationMode' = 'nearest', align_corners: 'bool | None' = None) -> 'Tensor'

upsample(input, size=None, scale_factor=None, mode="nearest", align_corners=None) -> Tensor

The same resampling as :func:interpolate.

upsample_bicubic2d​

upsample_bicubic2d(*args, **kwargs)

upsample_bicubic2d(input: clika_runtime._core.Tensor, sizes: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor] = [], scale_factors: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor] = [], align_corners: bool = False) -> clika_runtime._core.Tensor

upsample_bicubic2d(input, sizes=[], scale_factors=[], align_corners=False) -> Tensor

The upsample_bicubic2d operator.

upsample_bilinear​

upsample_bilinear(input: 'Tensor', size: 'int | Sequence[int] | None' = None, scale_factor: 'float | Sequence[float] | None' = None) -> 'Tensor'

upsample_bilinear(input, size=None, scale_factor=None) -> Tensor

Bilinear resampling of the spatial dimensions with aligned corners.

upsample_bilinear2d​

upsample_bilinear2d(*args, **kwargs)

upsample_bilinear2d(input: clika_runtime._core.Tensor, sizes: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor] = [], scale_factors: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor] = [], align_corners: bool = False) -> clika_runtime._core.Tensor

upsample_bilinear2d(input, sizes=[], scale_factors=[], align_corners=False) -> Tensor

The upsample_bilinear2d operator.

upsample_linear1d​

upsample_linear1d(*args, **kwargs)

upsample_linear1d(input: clika_runtime._core.Tensor, sizes: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor] = [], scale_factors: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor] = [], align_corners: bool = False) -> clika_runtime._core.Tensor

upsample_linear1d(input, sizes=[], scale_factors=[], align_corners=False) -> Tensor

The upsample_linear1d operator.

upsample_nearest​

upsample_nearest(input: 'Tensor', size: 'int | Sequence[int] | None' = None, scale_factor: 'float | Sequence[float] | None' = None) -> 'Tensor'

upsample_nearest(input, size=None, scale_factor=None) -> Tensor

Nearest-neighbor resampling of the spatial dimensions.

upsample_nearest1d​

upsample_nearest1d(*args, **kwargs)

upsample_nearest1d(input: clika_runtime._core.Tensor, sizes: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor] = [], scale_factors: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor] = []) -> clika_runtime._core.Tensor

upsample_nearest1d(input, sizes=[], scale_factors=[]) -> Tensor

The upsample_nearest1d operator.

upsample_nearest2d​

upsample_nearest2d(*args, **kwargs)

upsample_nearest2d(input: clika_runtime._core.Tensor, sizes: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor] = [], scale_factors: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor] = []) -> clika_runtime._core.Tensor

upsample_nearest2d(input, sizes=[], scale_factors=[]) -> Tensor

The upsample_nearest2d operator.

upsample_nearest3d​

upsample_nearest3d(*args, **kwargs)

upsample_nearest3d(input: clika_runtime._core.Tensor, sizes: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor] = [], scale_factors: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor] = []) -> clika_runtime._core.Tensor

upsample_nearest3d(input, sizes=[], scale_factors=[]) -> Tensor

The upsample_nearest3d operator.

upsample_trilinear3d​

upsample_trilinear3d(*args, **kwargs)

upsample_trilinear3d(input: clika_runtime._core.Tensor, sizes: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor] = [], scale_factors: collections.abc.Sequence[clika_runtime._core.ops.ScalarOrTensor] = [], align_corners: bool = False) -> clika_runtime._core.Tensor

upsample_trilinear3d(input, sizes=[], scale_factors=[], align_corners=False) -> Tensor

The upsample_trilinear3d operator.