VoidTensorOps

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun <T : DType, V> abs(tensor: Tensor<T, V>): Tensor<T, V>

Element-wise absolute value: |x|

Link copied to clipboard
open override fun <T : DType, V> add(a: Tensor<T, V>, b: Tensor<T, V>): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> addScalar(a: Tensor<T, V>, b: Number): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> avgPool2d(input: Tensor<T, V>, kernelSize: Pair<Int, Int>, stride: Pair<Int, Int>, padding: Pair<Int, Int>, countIncludePad: Boolean): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> clamp(tensor: Tensor<T, V>, minVal: Float, maxVal: Float): Tensor<T, V>

Element-wise clamp: min(max(x, minVal), maxVal)

Link copied to clipboard
open override fun <T : DType, V> concat(tensors: List<Tensor<T, V>>, dim: Int): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> conv1d(input: Tensor<T, V>, weight: Tensor<T, V>, bias: Tensor<T, V>?, stride: Int, padding: Int, dilation: Int, groups: Int): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> conv2d(input: Tensor<T, V>, weight: Tensor<T, V>, bias: Tensor<T, V>?, stride: Pair<Int, Int>, padding: Pair<Int, Int>, dilation: Pair<Int, Int>, groups: Int): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> conv3d(input: Tensor<T, V>, weight: Tensor<T, V>, bias: Tensor<T, V>?, stride: Triple<Int, Int, Int>, padding: Triple<Int, Int, Int>, dilation: Triple<Int, Int, Int>, groups: Int): Tensor<T, V>
Link copied to clipboard
open override fun <TFrom : DType, TTo : DType, V> convert(tensor: Tensor<TFrom, V>, targetType: TTo): Tensor<TTo, V>
Link copied to clipboard
open override fun <T : DType, V> divide(a: Tensor<T, V>, b: Tensor<T, V>): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> divScalar(a: Tensor<T, V>, b: Number): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> elu(tensor: Tensor<T, V>, alpha: Float): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> flatten(tensor: Tensor<T, V>, startDim: Int, endDim: Int): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> ge(tensor: Tensor<T, V>, value: Float): Tensor<T, V>

Element-wise greater than or equal: x >= value → 1.0, else 0.0

Link copied to clipboard
open override fun <T : DType, V> gelu(tensor: Tensor<T, V>): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> leakyRelu(tensor: Tensor<T, V>, negativeSlope: Float): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> logSoftmax(tensor: Tensor<T, V>, dim: Int): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> lt(tensor: Tensor<T, V>, value: Float): Tensor<T, V>

Element-wise less than: x < value → 1.0, else 0.0

Link copied to clipboard
open override fun <T : DType, V> matmul(a: Tensor<T, V>, b: Tensor<T, V>): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> maxPool2d(input: Tensor<T, V>, kernelSize: Pair<Int, Int>, stride: Pair<Int, Int>, padding: Pair<Int, Int>): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> mean(tensor: Tensor<T, V>, dim: Int?): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> mulScalar(a: Tensor<T, V>, b: Number): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> multiply(a: Tensor<T, V>, b: Tensor<T, V>): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> narrow(tensor: Tensor<T, V>, dim: Int, start: Int, length: Int): Tensor<T, V>

Extract a sub-tensor along dimension dim starting at start with the given length.

Link copied to clipboard
open override fun <T : DType, V> pad2d(tensor: Tensor<T, V>, padLeft: Int, padRight: Int, padTop: Int, padBottom: Int): Tensor<T, V>

Zero-pad a 4D tensor N, C, H, W on the spatial dimensions.

Link copied to clipboard
open override fun <T : DType, V> rdivScalar(a: Number, b: Tensor<T, V>): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> relu(tensor: Tensor<T, V>): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> reshape(tensor: Tensor<T, V>, newShape: Shape): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> rsubScalar(a: Number, b: Tensor<T, V>): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> sigmoid(tensor: Tensor<T, V>): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> sign(tensor: Tensor<T, V>): Tensor<T, V>

Element-wise sign: -1 for negative, 0 for zero, +1 for positive. Non-differentiable.

Link copied to clipboard
open override fun <T : DType, V> silu(tensor: Tensor<T, V>): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> softmax(tensor: Tensor<T, V>, dim: Int): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> split(tensor: Tensor<T, V>, splitSize: Int, dim: Int): List<Tensor<T, V>>
Link copied to clipboard
open override fun <T : DType, V> sqrt(tensor: Tensor<T, V>): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> squeeze(tensor: Tensor<T, V>, dim: Int?): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> subScalar(a: Tensor<T, V>, b: Number): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> subtract(a: Tensor<T, V>, b: Tensor<T, V>): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> sum(tensor: Tensor<T, V>, dim: Int?): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> transpose(tensor: Tensor<T, V>): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> tril(tensor: Tensor<T, V>, k: Int): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> unfold(tensor: Tensor<T, V>, dim: Int, size: Int, step: Int): Tensor<T, V>

Extract sliding windows of size size along dimension dim with stride step. Result has one extra dimension appended containing the window elements.

Link copied to clipboard
open override fun <T : DType, V> unsqueeze(tensor: Tensor<T, V>, dim: Int): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> upsample2d(input: Tensor<T, V>, scale: Pair<Int, Int>, mode: UpsampleMode, alignCorners: Boolean): Tensor<T, V>
Link copied to clipboard
open override fun <T : DType, V> variance(tensor: Tensor<T, V>, dim: Int?): Tensor<T, V>