Tensor
type Tensor struct {
// contains filtered or unexported fields
}
Tensor is a caller-owned handle; Release it when done (the last release frees the storage).
Constructors and associated declarations
Amax
func Amax(input *Tensor, dims []int64, keepdim bool) (*Tensor, error)
Amax takes the elementwise maximum over dims; nil (or empty) dims reduce over every axis.
Gelu
func Gelu(input *Tensor) (*Tensor, error)
Gelu computes `gelu(input)` in the exact (non-approximate) form; pick an approximation with Api.OpGelu or Tensor.Gelu.
Linear
func Linear(input, weight, bias *Tensor,
activation *Activation) (*Tensor, error)
Linear computes `input @ weight^T + bias`. A nil bias means none; a nil activation means no fused epilogue.
LogSoftmax
func LogSoftmax(input *Tensor, dim int64) (*Tensor, error)
LogSoftmax computes `log_softmax(input, dim)` at the input's own dtype.
Matmul
func Matmul(input, other *Tensor) (*Tensor, error)
Matmul computes `input @ other`, the function form of the matrix product, with no bias, no fused activation, and no transposes.
Mean
func Mean(input *Tensor, dims []int64, keepdim bool) (*Tensor, error)
Mean reduces over dims at the input's own dtype; nil (or empty) dims reduce over every axis.
Relu
func Relu(input *Tensor) (*Tensor, error)
Relu computes `relu(input)`, elementwise.
Sigmoid
func Sigmoid(input *Tensor) (*Tensor, error)
Sigmoid computes `sigmoid(input)`, elementwise.
Silu
func Silu(input *Tensor) (*Tensor, error)
Silu computes `silu(input)`, elementwise.
Softmax
func Softmax(input *Tensor, dim int64) (*Tensor, error)
Softmax computes `softmax(input, dim)` at the input's own dtype.
Sum
func Sum(input *Tensor, dims []int64, keepdim bool) (*Tensor, error)
Sum reduces over dims at the input's own dtype; nil (or empty) dims reduce over every axis.
Tanh
func Tanh(input *Tensor) (*Tensor, error)
Tanh computes `tanh(input)`, elementwise.
TensorOf
func TensorOf[T Element](a *Api, data []T, shape []int64) (*Tensor, error)
TensorOf copies data (row-major over shape) into a new tensor on the default placement:
x, err := clikart.TensorOf(a, []float32{1, 2, 3, 4}, []int64{2, 2})
The dtype follows the element type; conversion to any other dtype runs in the runtime (a cast op), never host-side.
Methods
Abs
func (t *Tensor) Abs() (*Tensor, error)
Abs: the `abs` operator; delegates to Api.OpAbs. Non-consuming (retain-before-consuming-op).
Abs_
func (t *Tensor) Abs_() (*Tensor, error)
Abs_: the `abs_` operator; delegates to Api.OpAbsInplace. Returns the receiver so in-place calls chain.
Acos
func (t *Tensor) Acos() (*Tensor, error)
Acos: the `acos` operator; delegates to Api.OpAcos. Non-consuming (retain-before-consuming-op).
Acos_
func (t *Tensor) Acos_() (*Tensor, error)
Acos_: the `acos_` operator; delegates to Api.OpAcosInplace. Returns the receiver so in-place calls chain.
Acosh
func (t *Tensor) Acosh() (*Tensor, error)
Acosh: the `acosh` operator; delegates to Api.OpAcosh. Non-consuming (retain-before-consuming-op).
Acosh_
func (t *Tensor) Acosh_() (*Tensor, error)
Acosh_: the `acosh_` operator; delegates to Api.OpAcoshInplace. Returns the receiver so in-place calls chain.
AdaptiveAvgPool
func (t *Tensor) AdaptiveAvgPool(outputSize []int64) (*Tensor, error)
AdaptiveAvgPool: the `adaptive_avg_pool` operator; delegates to Api.OpAdaptiveAvgPool. Non-consuming (retain-before-consuming-op).
AdaptiveAvgPool1d
func (t *Tensor) AdaptiveAvgPool1d(outputSize []int64) (*Tensor, error)
AdaptiveAvgPool1d: the `adaptive_avg_pool1d` operator; delegates to Api.OpAdaptiveAvgPool1d. Non-consuming (retain-before-consuming-op).
AdaptiveAvgPool2d
func (t *Tensor) AdaptiveAvgPool2d(outputSize []int64) (*Tensor, error)
AdaptiveAvgPool2d: the `adaptive_avg_pool2d` operator; delegates to Api.OpAdaptiveAvgPool2d. Non-consuming (retain-before-consuming-op).
AdaptiveAvgPool3d
func (t *Tensor) AdaptiveAvgPool3d(outputSize []int64) (*Tensor, error)
AdaptiveAvgPool3d: the `adaptive_avg_pool3d` operator; delegates to Api.OpAdaptiveAvgPool3d. Non-consuming (retain-before-consuming-op).
AdaptiveMaxPool
func (t *Tensor) AdaptiveMaxPool(outputSize []int64) (*Tensor, error)
AdaptiveMaxPool: the `adaptive_max_pool` operator; delegates to Api.OpAdaptiveMaxPool. Non-consuming (retain-before-consuming-op).
AdaptiveMaxPool1d
func (t *Tensor) AdaptiveMaxPool1d(outputSize []int64) (*Tensor, error)
AdaptiveMaxPool1d: the `adaptive_max_pool1d` operator; delegates to Api.OpAdaptiveMaxPool1d. Non-consuming (retain-before-consuming-op).
AdaptiveMaxPool2d
func (t *Tensor) AdaptiveMaxPool2d(outputSize []int64) (*Tensor, error)
AdaptiveMaxPool2d: the `adaptive_max_pool2d` operator; delegates to Api.OpAdaptiveMaxPool2d. Non-consuming (retain-before-consuming-op).
AdaptiveMaxPool3d
func (t *Tensor) AdaptiveMaxPool3d(outputSize []int64) (*Tensor, error)
AdaptiveMaxPool3d: the `adaptive_max_pool3d` operator; delegates to Api.OpAdaptiveMaxPool3d. Non-consuming (retain-before-consuming-op).
AddLayerNorm
func (t *Tensor) AddLayerNorm(residual *Tensor, postResidual *Tensor, normalizedShape []int64, skipBias *Tensor, weight *Tensor, bias *Tensor, epsHas bool, eps float64, activationHas bool, activation Activation) (*Tensor, *Tensor, error)
AddLayerNorm: the `add_layer_norm` operator; delegates to Api.OpAddLayerNorm. Non-consuming (retain-before-consuming-op).
AddRmsNorm
func (t *Tensor) AddRmsNorm(residual *Tensor, residual2 *Tensor, postResidual *Tensor, normalizedShape []int64, skipBias *Tensor, weight *Tensor, bias *Tensor, epsHas bool, eps float64, activationHas bool, activation Activation) (*Tensor, *Tensor, error)
AddRmsNorm: the `add_rms_norm` operator; delegates to Api.OpAddRmsNorm. Non-consuming (retain-before-consuming-op).
AddTensor
func (t *Tensor) AddTensor(other ScalarOrTensor, alpha float64, activation Activation) (*Tensor, error)
AddTensor: the `add_tensor` operator; delegates to Api.OpAddTensor. Non-consuming (retain-before-consuming-op).
Add_
func (t *Tensor) Add_(other ScalarOrTensor, alpha float64, activation Activation) (*Tensor, error)
Add_: the `add_` operator; delegates to Api.OpAddInplace. Returns the receiver so in-place calls chain.
All
func (t *Tensor) All(dims []int64, keepdim bool) (*Tensor, error)
All: the `all` operator; delegates to Api.OpAll. Non-consuming (retain-before-consuming-op).
Allclose
func (t *Tensor) Allclose(b *Tensor, rtol float64, atol float64, equalNan bool) (*Tensor, error)
Allclose: the `allclose` operator; delegates to Api.OpAllclose. Non-consuming (retain-before-consuming-op).
Amax
func (t *Tensor) Amax(dims []int64, keepdim bool) (*Tensor, error)
Amax: the `amax` operator; delegates to Api.OpAmax. Non-consuming (retain-before-consuming-op).
Amin
func (t *Tensor) Amin(dims []int64, keepdim bool) (*Tensor, error)
Amin: the `amin` operator; delegates to Api.OpAmin. Non-consuming (retain-before-consuming-op).
Aminmax
func (t *Tensor) Aminmax(dimHas bool, dim int64, keepdim bool) (*Tensor, *Tensor, error)
Aminmax: the `aminmax` operator; delegates to Api.OpAminmax. Non-consuming (retain-before-consuming-op).
Any
func (t *Tensor) Any(dims []int64, keepdim bool) (*Tensor, error)
Any: the `any` operator; delegates to Api.OpAny. Non-consuming (retain-before-consuming-op).
Argmax
func (t *Tensor) Argmax(dims []int64, keepdim bool, indexDtype DataType) (*Tensor, error)
Argmax: the `argmax` operator; delegates to Api.OpArgmax. Non-consuming (retain-before-consuming-op).
Argmin
func (t *Tensor) Argmin(dims []int64, keepdim bool, indexDtype DataType) (*Tensor, error)
Argmin: the `argmin` operator; delegates to Api.OpArgmin. Non-consuming (retain-before-consuming-op).
Argsort
func (t *Tensor) Argsort(dim int64, descending bool, stable bool) (*Tensor, error)
Argsort: the `argsort` operator; delegates to Api.OpArgsort. Non-consuming (retain-before-consuming-op).
Asin
func (t *Tensor) Asin() (*Tensor, error)
Asin: the `asin` operator; delegates to Api.OpAsin. Non-consuming (retain-before-consuming-op).
Asin_
func (t *Tensor) Asin_() (*Tensor, error)
Asin_: the `asin_` operator; delegates to Api.OpAsinInplace. Returns the receiver so in-place calls chain.
Asinh
func (t *Tensor) Asinh() (*Tensor, error)
Asinh: the `asinh` operator; delegates to Api.OpAsinh. Non-consuming (retain-before-consuming-op).
Asinh_
func (t *Tensor) Asinh_() (*Tensor, error)
Asinh_: the `asinh_` operator; delegates to Api.OpAsinhInplace. Returns the receiver so in-place calls chain.
Atan
func (t *Tensor) Atan() (*Tensor, error)
Atan: the `atan` operator; delegates to Api.OpAtan. Non-consuming (retain-before-consuming-op).
Atan2
func (t *Tensor) Atan2(b *Tensor) (*Tensor, error)
Atan2: the `atan2` operator; delegates to Api.OpAtan2. Non-consuming (retain-before-consuming-op).
Atan2_
func (t *Tensor) Atan2_(other *Tensor) (*Tensor, error)
Atan2_: the `atan2_` operator; delegates to Api.OpAtan2Inplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
Atan_
func (t *Tensor) Atan_() (*Tensor, error)
Atan_: the `atan_` operator; delegates to Api.OpAtanInplace. Returns the receiver so in-place calls chain.
Atanh
func (t *Tensor) Atanh() (*Tensor, error)
Atanh: the `atanh` operator; delegates to Api.OpAtanh. Non-consuming (retain-before-consuming-op).
Atanh_
func (t *Tensor) Atanh_() (*Tensor, error)
Atanh_: the `atanh_` operator; delegates to Api.OpAtanhInplace. Returns the receiver so in-place calls chain.
Atleast1d
func (t *Tensor) Atleast1d() (*Tensor, error)
Atleast1d: the `atleast_1d` operator; delegates to Api.OpAtleast1d. Non-consuming (retain-before-consuming-op).
Atleast2d
func (t *Tensor) Atleast2d() (*Tensor, error)
Atleast2d: the `atleast_2d` operator; delegates to Api.OpAtleast2d. Non-consuming (retain-before-consuming-op).
Atleast3d
func (t *Tensor) Atleast3d() (*Tensor, error)
Atleast3d: the `atleast_3d` operator; delegates to Api.OpAtleast3d. Non-consuming (retain-before-consuming-op).
Attention
func (t *Tensor) Attention(k *Tensor, v *Tensor, attnMask *Tensor, headSink *Tensor, qScale ScalarOrTensor, kScale ScalarOrTensor, vScale ScalarOrTensor, opts *AttentionOptions) (*Tensor, error)
Attention: the `attention` operator; delegates to Api.OpAttention. Non-consuming (retain-before-consuming-op).
AttentionOverCache
func (t *Tensor) AttentionOverCache(cacheKey *Tensor, cacheValue *Tensor, kvcacheStart *Tensor, cuSeqlensQ *Tensor, cuSeqlensK *Tensor, maxSeqlenQ ScalarOrTensor, maxSeqlenK ScalarOrTensor, ropeCos *Tensor, ropeSin *Tensor, positionIds *Tensor, attnMask *Tensor, qScale ScalarOrTensor, kScale ScalarOrTensor, vScale ScalarOrTensor, headSink *Tensor, qNormGain *Tensor, kNormGain *Tensor, slotIds *Tensor, opts *AttentionOverCacheOptions) (*Tensor, error)
AttentionOverCache: the `attention_over_cache` operator; delegates to Api.OpAttentionOverCache. Non-consuming (retain-before-consuming-op).
AttentionVarlen
func (t *Tensor) AttentionVarlen(k *Tensor, v *Tensor, cuSeqlensQ *Tensor, cuSeqlensK *Tensor, maxSeqlenQ ScalarOrTensor, maxSeqlenK ScalarOrTensor, attnMask *Tensor, headSink *Tensor, qScale ScalarOrTensor, kScale ScalarOrTensor, vScale ScalarOrTensor, opts *AttentionVarlenOptions) (*Tensor, error)
AttentionVarlen: the `attention_varlen` operator; delegates to Api.OpAttentionVarlen. Non-consuming (retain-before-consuming-op).
AvgPool
func (t *Tensor) AvgPool(kernelSize []int64, stride []int64, padding []int64, ceilMode bool, countIncludePad bool, divisorOverrideHas bool, divisorOverride int64) (*Tensor, error)
AvgPool: the `avg_pool` operator; delegates to Api.OpAvgPool. Non-consuming (retain-before-consuming-op).
AvgPool1d
func (t *Tensor) AvgPool1d(kernelSize []int64, stride []int64, padding []int64, ceilMode bool, countIncludePad bool) (*Tensor, error)
AvgPool1d: the `avg_pool1d` operator; delegates to Api.OpAvgPool1d. Non-consuming (retain-before-consuming-op).
AvgPool2d
func (t *Tensor) AvgPool2d(kernelSize []int64, stride []int64, padding []int64, ceilMode bool, countIncludePad bool, divisorOverrideHas bool, divisorOverride int64) (*Tensor, error)
AvgPool2d: the `avg_pool2d` operator; delegates to Api.OpAvgPool2d. Non-consuming (retain-before-consuming-op).
AvgPool3d
func (t *Tensor) AvgPool3d(kernelSize []int64, stride []int64, padding []int64, ceilMode bool, countIncludePad bool, divisorOverrideHas bool, divisorOverride int64) (*Tensor, error)
AvgPool3d: the `avg_pool3d` operator; delegates to Api.OpAvgPool3d. Non-consuming (retain-before-consuming-op).
BatchNorm
func (t *Tensor) BatchNorm(weight *Tensor, bias *Tensor, runningMean *Tensor, runningVar *Tensor, epsHas bool, eps float64, activationHas bool, activation Activation) (*Tensor, error)
BatchNorm: the `batch_norm` operator; delegates to Api.OpBatchNorm. Non-consuming (retain-before-consuming-op).
Bernoulli_
func (t *Tensor) Bernoulli_(s StreamOrDevice) (*Tensor, error)
Bernoulli_: the `bernoulli_` operator; delegates to Api.OpBernoulliInplace. Returns the receiver so in-place calls chain.
BinaryCrossEntropy
func (t *Tensor) BinaryCrossEntropy(target *Tensor, weight *Tensor, reduction Reduction) (*Tensor, error)
BinaryCrossEntropy: the `binary_cross_entropy` operator; delegates to Api.OpBinaryCrossEntropy. Non-consuming (retain-before-consuming-op).
BinaryCrossEntropyWithLogits
func (t *Tensor) BinaryCrossEntropyWithLogits(target *Tensor, weight *Tensor, reduction Reduction, posWeight *Tensor) (*Tensor, error)
BinaryCrossEntropyWithLogits: the `binary_cross_entropy_with_logits` operator; delegates to Api.OpBinaryCrossEntropyWithLogits. Non-consuming (retain-before-consuming-op).
Bincount
func (t *Tensor) Bincount(weights *Tensor, minlength int64) (*Tensor, error)
Bincount: the `bincount` operator; delegates to Api.OpBincount. Non-consuming (retain-before-consuming-op).
BitwiseAnd
func (t *Tensor) BitwiseAnd(other ScalarOrTensor) (*Tensor, error)
BitwiseAnd: the `bitwise_and` operator; delegates to Api.OpBitwiseAnd. Non-consuming (retain-before-consuming-op).
BitwiseAnd_
func (t *Tensor) BitwiseAnd_(other ScalarOrTensor) (*Tensor, error)
BitwiseAnd_: the `bitwise_and_` operator; delegates to Api.OpBitwiseAndInplace. Returns the receiver so in-place calls chain.
BitwiseLeftShift
func (t *Tensor) BitwiseLeftShift(other ScalarOrTensor) (*Tensor, error)
BitwiseLeftShift: the `bitwise_left_shift` operator; delegates to Api.OpBitwiseLeftShift. Non-consuming (retain-before-consuming-op).
BitwiseLeftShift_
func (t *Tensor) BitwiseLeftShift_(other ScalarOrTensor) (*Tensor, error)
BitwiseLeftShift_: the `bitwise_left_shift_` operator; delegates to Api.OpBitwiseLeftShiftInplace. Returns the receiver so in-place calls chain.
BitwiseNot
func (t *Tensor) BitwiseNot() (*Tensor, error)
BitwiseNot: the `bitwise_not` operator; delegates to Api.OpBitwiseNot. Non-consuming (retain-before-consuming-op).
BitwiseNot_
func (t *Tensor) BitwiseNot_() (*Tensor, error)
BitwiseNot_: the `bitwise_not_` operator; delegates to Api.OpBitwiseNotInplace. Returns the receiver so in-place calls chain.
BitwiseOr
func (t *Tensor) BitwiseOr(other ScalarOrTensor) (*Tensor, error)
BitwiseOr: the `bitwise_or` operator; delegates to Api.OpBitwiseOr. Non-consuming (retain-before-consuming-op).
BitwiseOr_
func (t *Tensor) BitwiseOr_(other ScalarOrTensor) (*Tensor, error)
BitwiseOr_: the `bitwise_or_` operator; delegates to Api.OpBitwiseOrInplace. Returns the receiver so in-place calls chain.
BitwiseRightShift
func (t *Tensor) BitwiseRightShift(other ScalarOrTensor) (*Tensor, error)
BitwiseRightShift: the `bitwise_right_shift` operator; delegates to Api.OpBitwiseRightShift. Non-consuming (retain-before-consuming-op).
BitwiseRightShift_
func (t *Tensor) BitwiseRightShift_(other ScalarOrTensor) (*Tensor, error)
BitwiseRightShift_: the `bitwise_right_shift_` operator; delegates to Api.OpBitwiseRightShiftInplace. Returns the receiver so in-place calls chain.
BitwiseXor
func (t *Tensor) BitwiseXor(other ScalarOrTensor) (*Tensor, error)
BitwiseXor: the `bitwise_xor` operator; delegates to Api.OpBitwiseXor. Non-consuming (retain-before-consuming-op).
BitwiseXor_
func (t *Tensor) BitwiseXor_(other ScalarOrTensor) (*Tensor, error)
BitwiseXor_: the `bitwise_xor_` operator; delegates to Api.OpBitwiseXorInplace. Returns the receiver so in-place calls chain.
Bmm
func (t *Tensor) Bmm(b *Tensor, bias *Tensor, activationHas bool, activation Activation) (*Tensor, error)
Bmm: the `bmm` operator; delegates to Api.OpBmm. Non-consuming (retain-before-consuming-op).
BroadcastTo
func (t *Tensor) BroadcastTo(shape []ScalarOrTensor) (*Tensor, error)
BroadcastTo: the `broadcast_to` operator; delegates to Api.OpBroadcastTo. Non-consuming (retain-before-consuming-op).
Bucketize
func (t *Tensor) Bucketize(boundaries *Tensor, outInt32 bool, right bool) (*Tensor, error)
Bucketize: the `bucketize` operator; delegates to Api.OpBucketize. Non-consuming (retain-before-consuming-op).
Cast
func (t *Tensor) Cast(target DataType, forceCopy bool) (*Tensor, error)
Cast: the `cast` operator; delegates to Api.OpCast. Non-consuming (retain-before-consuming-op).
CastLike
func (t *Tensor) CastLike(reference *Tensor) (*Tensor, error)
CastLike: the `cast_like` operator; delegates to Api.OpCastLike. Non-consuming (retain-before-consuming-op).
CausalConvUpdate
func (t *Tensor) CausalConvUpdate(weight *Tensor, bias *Tensor, state *Tensor, seqLens *Tensor, slotIds *Tensor, activationHas bool, activation Activation) (*Tensor, error)
CausalConvUpdate: the `causal_conv_update` operator; delegates to Api.OpCausalConvUpdate. Non-consuming (retain-before-consuming-op).
Cdist
func (t *Tensor) Cdist(b *Tensor, p Scalar) (*Tensor, error)
Cdist: the `cdist` operator; delegates to Api.OpCdist. Non-consuming (retain-before-consuming-op).
Ceil
func (t *Tensor) Ceil() (*Tensor, error)
Ceil: the `ceil` operator; delegates to Api.OpCeil. Non-consuming (retain-before-consuming-op).
Ceil_
func (t *Tensor) Ceil_() (*Tensor, error)
Ceil_: the `ceil_` operator; delegates to Api.OpCeilInplace. Returns the receiver so in-place calls chain.
Celu
func (t *Tensor) Celu(alpha float64) (*Tensor, error)
Celu: the `celu` operator; delegates to Api.OpCelu. Non-consuming (retain-before-consuming-op).
Celu_
func (t *Tensor) Celu_(alpha float64) (*Tensor, error)
Celu_: the `celu_` operator; delegates to Api.OpCeluInplace. Returns the receiver so in-place calls chain.
Chunk
func (t *Tensor) Chunk(numChunks int64, dim int64) (*TensorList, error)
Chunk: the `chunk` operator; delegates to Api.OpChunk. Non-consuming (retain-before-consuming-op).
CircularPad
func (t *Tensor) CircularPad(pad []ScalarOrTensor) (*Tensor, error)
CircularPad: the `circular_pad` operator; delegates to Api.OpCircularPad. Non-consuming (retain-before-consuming-op).
Clamp
func (t *Tensor) Clamp(min ScalarOrTensor, max ScalarOrTensor) (*Tensor, error)
Clamp: the `clamp` operator; delegates to Api.OpClamp. Non-consuming (retain-before-consuming-op).
ClampMax
func (t *Tensor) ClampMax(max ScalarOrTensor) (*Tensor, error)
ClampMax: the `clamp_max` operator; delegates to Api.OpClampMax. Non-consuming (retain-before-consuming-op).
ClampMax_
func (t *Tensor) ClampMax_(max ScalarOrTensor) (*Tensor, error)
ClampMax_: the `clamp_max_` operator; delegates to Api.OpClampMaxInplace. Returns the receiver so in-place calls chain.
ClampMin
func (t *Tensor) ClampMin(min ScalarOrTensor) (*Tensor, error)
ClampMin: the `clamp_min` operator; delegates to Api.OpClampMin. Non-consuming (retain-before-consuming-op).
ClampMin_
func (t *Tensor) ClampMin_(min ScalarOrTensor) (*Tensor, error)
ClampMin_: the `clamp_min_` operator; delegates to Api.OpClampMinInplace. Returns the receiver so in-place calls chain.
Clamp_
func (t *Tensor) Clamp_(min ScalarOrTensor, max ScalarOrTensor) (*Tensor, error)
Clamp_: the `clamp_` operator; delegates to Api.OpClampInplace. Returns the receiver so in-place calls chain.
ConstantPad
func (t *Tensor) ConstantPad(pad []ScalarOrTensor, value ScalarOrTensor) (*Tensor, error)
ConstantPad: the `constant_pad` operator; delegates to Api.OpConstantPad. Non-consuming (retain-before-consuming-op).
Contiguous
func (t *Tensor) Contiguous(forceCopy bool) (*Tensor, error)
Contiguous: the `contiguous` operator; delegates to Api.OpContiguous. Non-consuming (retain-before-consuming-op).
Conv
func (t *Tensor) Conv(weight *Tensor, bias *Tensor, stride []int64, padding []int64, dilation []int64, groups int64, mode PadMode, valueHas bool, value float64, activation Activation) (*Tensor, error)
Conv: the `conv` operator; delegates to Api.OpConv. Non-consuming (retain-before-consuming-op).
Conv1d
func (t *Tensor) Conv1d(weight *Tensor, bias *Tensor, stride []int64, padding []int64, dilation []int64, groups int64, activation Activation) (*Tensor, error)
Conv1d: the `conv1d` operator; delegates to Api.OpConv1d. Non-consuming (retain-before-consuming-op).
Conv2d
func (t *Tensor) Conv2d(weight *Tensor, bias *Tensor, stride []int64, padding []int64, dilation []int64, groups int64, activation Activation) (*Tensor, error)
Conv2d: the `conv2d` operator; delegates to Api.OpConv2d. Non-consuming (retain-before-consuming-op).
Conv3d
func (t *Tensor) Conv3d(weight *Tensor, bias *Tensor, stride []int64, padding []int64, dilation []int64, groups int64, activation Activation) (*Tensor, error)
Conv3d: the `conv3d` operator; delegates to Api.OpConv3d. Non-consuming (retain-before-consuming-op).
ConvTranspose
func (t *Tensor) ConvTranspose(weight *Tensor, bias *Tensor, stride []int64, padding []int64, outputPadding []int64, groups int64, dilation []int64, activation Activation) (*Tensor, error)
ConvTranspose: the `conv_transpose` operator; delegates to Api.OpConvTranspose. Non-consuming (retain-before-consuming-op).
ConvTranspose1d
func (t *Tensor) ConvTranspose1d(weight *Tensor, bias *Tensor, opts *ConvTranspose1dOptions) (*Tensor, error)
ConvTranspose1d: the `conv_transpose1d` operator; delegates to Api.OpConvTranspose1d. Non-consuming (retain-before-consuming-op).
ConvTranspose2d
func (t *Tensor) ConvTranspose2d(weight *Tensor, bias *Tensor, opts *ConvTranspose2dOptions) (*Tensor, error)
ConvTranspose2d: the `conv_transpose2d` operator; delegates to Api.OpConvTranspose2d. Non-consuming (retain-before-consuming-op).
ConvTranspose3d
func (t *Tensor) ConvTranspose3d(weight *Tensor, bias *Tensor, opts *ConvTranspose3dOptions) (*Tensor, error)
ConvTranspose3d: the `conv_transpose3d` operator; delegates to Api.OpConvTranspose3d. Non-consuming (retain-before-consuming-op).
Copy_
func (t *Tensor) Copy_(src *Tensor, target StreamOrDevice) (*Tensor, error)
Copy_: the `copy_` operator; delegates to Api.OpCopyInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
Copysign
func (t *Tensor) Copysign(other ScalarOrTensor) (*Tensor, error)
Copysign: the `copysign` operator; delegates to Api.OpCopysign. Non-consuming (retain-before-consuming-op).
Copysign_
func (t *Tensor) Copysign_(other ScalarOrTensor) (*Tensor, error)
Copysign_: the `copysign_` operator; delegates to Api.OpCopysignInplace. Returns the receiver so in-place calls chain.
Cos
func (t *Tensor) Cos() (*Tensor, error)
Cos: the `cos` operator; delegates to Api.OpCos. Non-consuming (retain-before-consuming-op).
Cos_
func (t *Tensor) Cos_() (*Tensor, error)
Cos_: the `cos_` operator; delegates to Api.OpCosInplace. Returns the receiver so in-place calls chain.
Cosh
func (t *Tensor) Cosh() (*Tensor, error)
Cosh: the `cosh` operator; delegates to Api.OpCosh. Non-consuming (retain-before-consuming-op).
Cosh_
func (t *Tensor) Cosh_() (*Tensor, error)
Cosh_: the `cosh_` operator; delegates to Api.OpCoshInplace. Returns the receiver so in-place calls chain.
CosineSimilarity
func (t *Tensor) CosineSimilarity(b *Tensor, dim int64, epsHas bool, eps float64) (*Tensor, error)
CosineSimilarity: the `cosine_similarity` operator; delegates to Api.OpCosineSimilarity. Non-consuming (retain-before-consuming-op).
CountNonzero
func (t *Tensor) CountNonzero(dims []int64) (*Tensor, error)
CountNonzero: the `count_nonzero` operator; delegates to Api.OpCountNonzero. Non-consuming (retain-before-consuming-op).
Cross
func (t *Tensor) Cross(b *Tensor, dimHas bool, dim int64) (*Tensor, error)
Cross: the `cross` operator; delegates to Api.OpCross. Non-consuming (retain-before-consuming-op).
CrossEntropy
func (t *Tensor) CrossEntropy(target *Tensor, weight *Tensor, ignoreIndexHas bool, ignoreIndex int64, reduction Reduction) (*Tensor, error)
CrossEntropy: the `cross_entropy` operator; delegates to Api.OpCrossEntropy. Non-consuming (retain-before-consuming-op).
Cummax
func (t *Tensor) Cummax(dim int64) (*Tensor, *Tensor, error)
Cummax: the `cummax` operator; delegates to Api.OpCummax. Non-consuming (retain-before-consuming-op).
Cummin
func (t *Tensor) Cummin(dim int64) (*Tensor, *Tensor, error)
Cummin: the `cummin` operator; delegates to Api.OpCummin. Non-consuming (retain-before-consuming-op).
Cumprod
func (t *Tensor) Cumprod(dim int64, dtype DataType) (*Tensor, error)
Cumprod: the `cumprod` operator; delegates to Api.OpCumprod. Non-consuming (retain-before-consuming-op).
Cumprod_
func (t *Tensor) Cumprod_(dim int64, dtype DataType) (*Tensor, error)
Cumprod_: the `cumprod_` operator; delegates to Api.OpCumprodInplace. Returns the receiver so in-place calls chain.
Cumsum
func (t *Tensor) Cumsum(dim int64, dtype DataType) (*Tensor, error)
Cumsum: the `cumsum` operator; delegates to Api.OpCumsum. Non-consuming (retain-before-consuming-op).
Cumsum_
func (t *Tensor) Cumsum_(dim int64, dtype DataType) (*Tensor, error)
Cumsum_: the `cumsum_` operator; delegates to Api.OpCumsumInplace. Returns the receiver so in-place calls chain.
DeformConv
func (t *Tensor) DeformConv(weight *Tensor, offset *Tensor, mask *Tensor, bias *Tensor, opts *DeformConvOptions) (*Tensor, error)
DeformConv: the `deform_conv` operator; delegates to Api.OpDeformConv. Non-consuming (retain-before-consuming-op).
Deg2rad
func (t *Tensor) Deg2rad() (*Tensor, error)
Deg2rad: the `deg2rad` operator; delegates to Api.OpDeg2rad. Non-consuming (retain-before-consuming-op).
Deg2rad_
func (t *Tensor) Deg2rad_() (*Tensor, error)
Deg2rad_: the `deg2rad_` operator; delegates to Api.OpDeg2radInplace. Returns the receiver so in-place calls chain.
Diag
func (t *Tensor) Diag(diagonal int64) (*Tensor, error)
Diag: the `diag` operator; delegates to Api.OpDiag. Non-consuming (retain-before-consuming-op).
DiagEmbed
func (t *Tensor) DiagEmbed(offset int64, dim1 int64, dim2 int64) (*Tensor, error)
DiagEmbed: the `diag_embed` operator; delegates to Api.OpDiagEmbed. Non-consuming (retain-before-consuming-op).
Diagonal
func (t *Tensor) Diagonal(offset int64, dim1 int64, dim2 int64) (*Tensor, error)
Diagonal: the `diagonal` operator; delegates to Api.OpDiagonal. Non-consuming (retain-before-consuming-op).
Diff
func (t *Tensor) Diff(n int64, dim int64, prepend *Tensor, append *Tensor) (*Tensor, error)
Diff: the `diff` operator; delegates to Api.OpDiff. Non-consuming (retain-before-consuming-op).
DivTensor
func (t *Tensor) DivTensor(other ScalarOrTensor, roundingMode RoundingMode, activation Activation) (*Tensor, error)
DivTensor: the `div_tensor` operator; delegates to Api.OpDivTensor. Non-consuming (retain-before-consuming-op).
Div_
func (t *Tensor) Div_(other ScalarOrTensor, roundingMode RoundingMode, activation Activation) (*Tensor, error)
Div_: the `div_` operator; delegates to Api.OpDivInplace. Returns the receiver so in-place calls chain.
Dot
func (t *Tensor) Dot(b *Tensor) (*Tensor, error)
Dot: the `dot` operator; delegates to Api.OpDot. Non-consuming (retain-before-consuming-op).
Dtype
func (t *Tensor) Dtype() DataType
Dtype reports the tensor's element type.
DynamicQuantize
func (t *Tensor) DynamicQuantize() (*Tensor, *Tensor, *Tensor, error)
DynamicQuantize: the `dynamic_quantize` operator; delegates to Api.OpDynamicQuantize. Non-consuming (retain-before-consuming-op).
Elu
func (t *Tensor) Elu(alpha float64, scale float64, inputScale float64) (*Tensor, error)
Elu: the `elu` operator; delegates to Api.OpElu. Non-consuming (retain-before-consuming-op).
Elu_
func (t *Tensor) Elu_(alpha float64, scale float64, inputScale float64) (*Tensor, error)
Elu_: the `elu_` operator; delegates to Api.OpEluInplace. Returns the receiver so in-place calls chain.
Eq
func (t *Tensor) Eq(other ScalarOrTensor) (*Tensor, error)
Eq: the `eq` operator; delegates to Api.OpEq. Non-consuming (retain-before-consuming-op).
Eq_
func (t *Tensor) Eq_(other ScalarOrTensor) (*Tensor, error)
Eq_: the `eq_` operator; delegates to Api.OpEqInplace. Returns the receiver so in-place calls chain.
Erf
func (t *Tensor) Erf() (*Tensor, error)
Erf: the `erf` operator; delegates to Api.OpErf. Non-consuming (retain-before-consuming-op).
Erf_
func (t *Tensor) Erf_() (*Tensor, error)
Erf_: the `erf_` operator; delegates to Api.OpErfInplace. Returns the receiver so in-place calls chain.
Erfc
func (t *Tensor) Erfc() (*Tensor, error)
Erfc: the `erfc` operator; delegates to Api.OpErfc. Non-consuming (retain-before-consuming-op).
Erfc_
func (t *Tensor) Erfc_() (*Tensor, error)
Erfc_: the `erfc_` operator; delegates to Api.OpErfcInplace. Returns the receiver so in-place calls chain.
Erfinv
func (t *Tensor) Erfinv() (*Tensor, error)
Erfinv: the `erfinv` operator; delegates to Api.OpErfinv. Non-consuming (retain-before-consuming-op).
Erfinv_
func (t *Tensor) Erfinv_() (*Tensor, error)
Erfinv_: the `erfinv_` operator; delegates to Api.OpErfinvInplace. Returns the receiver so in-place calls chain.
Exp
func (t *Tensor) Exp() (*Tensor, error)
Exp: the `exp` operator; delegates to Api.OpExp. Non-consuming (retain-before-consuming-op).
Exp_
func (t *Tensor) Exp_() (*Tensor, error)
Exp_: the `exp_` operator; delegates to Api.OpExpInplace. Returns the receiver so in-place calls chain.
Expand
func (t *Tensor) Expand(shape []ScalarOrTensor, bidirectional bool) (*Tensor, error)
Expand: the `expand` operator; delegates to Api.OpExpand. Non-consuming (retain-before-consuming-op).
ExpandAs
func (t *Tensor) ExpandAs(other *Tensor) (*Tensor, error)
ExpandAs: the `expand_as` operator; delegates to Api.OpExpandAs. Non-consuming (retain-before-consuming-op).
Exponential_
func (t *Tensor) Exponential_(lambd float64, s StreamOrDevice) (*Tensor, error)
Exponential_: the `exponential_` operator; delegates to Api.OpExponentialInplace. Returns the receiver so in-place calls chain.
FastGelu
func (t *Tensor) FastGelu() (*Tensor, error)
FastGelu: the `fast_gelu` operator; delegates to Api.OpFastGelu. Non-consuming (retain-before-consuming-op).
Fill
func (t *Tensor) Fill(value ScalarOrTensor, s StreamOrDevice) (*Tensor, error)
Fill: the `fill` operator; delegates to Api.OpFill. Non-consuming (retain-before-consuming-op).
FillDiagonal
func (t *Tensor) FillDiagonal(fillValue Scalar, wrap bool, s StreamOrDevice) (*Tensor, error)
FillDiagonal: the `fill_diagonal` operator; delegates to Api.OpFillDiagonal. Non-consuming (retain-before-consuming-op).
FillDiagonal_
func (t *Tensor) FillDiagonal_(fillValue Scalar, wrap bool, s StreamOrDevice) (*Tensor, error)
FillDiagonal_: the `fill_diagonal_` operator; delegates to Api.OpFillDiagonalInplace. Returns the receiver so in-place calls chain.
Fill_
func (t *Tensor) Fill_(value ScalarOrTensor, s StreamOrDevice) (*Tensor, error)
Fill_: the `fill_` operator; delegates to Api.OpFillInplace. Returns the receiver so in-place calls chain.
Flatten
func (t *Tensor) Flatten(startDim int64, endDim int64) (*Tensor, error)
Flatten: the `flatten` operator; delegates to Api.OpFlatten. Non-consuming (retain-before-consuming-op).
Flip
func (t *Tensor) Flip(dims []int64) (*Tensor, error)
Flip: the `flip` operator; delegates to Api.OpFlip. Non-consuming (retain-before-consuming-op).
Fliplr
func (t *Tensor) Fliplr() (*Tensor, error)
Fliplr: the `fliplr` operator; delegates to Api.OpFliplr. Non-consuming (retain-before-consuming-op).
Flipud
func (t *Tensor) Flipud() (*Tensor, error)
Flipud: the `flipud` operator; delegates to Api.OpFlipud. Non-consuming (retain-before-consuming-op).
Floor
func (t *Tensor) Floor() (*Tensor, error)
Floor: the `floor` operator; delegates to Api.OpFloor. Non-consuming (retain-before-consuming-op).
FloorDivide
func (t *Tensor) FloorDivide(other ScalarOrTensor) (*Tensor, error)
FloorDivide: the `floor_divide` operator; delegates to Api.OpFloorDivide. Non-consuming (retain-before-consuming-op).
FloorDivide_
func (t *Tensor) FloorDivide_(other ScalarOrTensor) (*Tensor, error)
FloorDivide_: the `floor_divide_` operator; delegates to Api.OpFloorDivideInplace. Returns the receiver so in-place calls chain.
Floor_
func (t *Tensor) Floor_() (*Tensor, error)
Floor_: the `floor_` operator; delegates to Api.OpFloorInplace. Returns the receiver so in-place calls chain.
Fmax
func (t *Tensor) Fmax(b *Tensor) (*Tensor, error)
Fmax: the `fmax` operator; delegates to Api.OpFmax. Non-consuming (retain-before-consuming-op).
Fmin
func (t *Tensor) Fmin(b *Tensor) (*Tensor, error)
Fmin: the `fmin` operator; delegates to Api.OpFmin. Non-consuming (retain-before-consuming-op).
Fmod
func (t *Tensor) Fmod(other ScalarOrTensor) (*Tensor, error)
Fmod: the `fmod` operator; delegates to Api.OpFmod. Non-consuming (retain-before-consuming-op).
Fmod_
func (t *Tensor) Fmod_(other ScalarOrTensor) (*Tensor, error)
Fmod_: the `fmod_` operator; delegates to Api.OpFmodInplace. Returns the receiver so in-place calls chain.
Fold
func (t *Tensor) Fold(outputSize []int64, kernelSize []int64, dilation []int64, padding []int64, stride []int64, mode PadMode, valueHas bool, value float64) (*Tensor, error)
Fold: the `fold` operator; delegates to Api.OpFold. Non-consuming (retain-before-consuming-op).
Frac
func (t *Tensor) Frac() (*Tensor, error)
Frac: the `frac` operator; delegates to Api.OpFrac. Non-consuming (retain-before-consuming-op).
Frac_
func (t *Tensor) Frac_() (*Tensor, error)
Frac_: the `frac_` operator; delegates to Api.OpFracInplace. Returns the receiver so in-place calls chain.
Frexp
func (t *Tensor) Frexp() (*Tensor, *Tensor, error)
Frexp: the `frexp` operator; delegates to Api.OpFrexp. Non-consuming (retain-before-consuming-op).
GatedDeltaUpdate
func (t *Tensor) GatedDeltaUpdate(k *Tensor, v *Tensor, beta *Tensor, g *Tensor, state *Tensor, seqLens *Tensor, slotIds *Tensor, scaleHas bool, scale float64, gateBias *Tensor, gateScale *Tensor) (*Tensor, error)
GatedDeltaUpdate: the `gated_delta_update` operator; delegates to Api.OpGatedDeltaUpdate. Non-consuming (retain-before-consuming-op).
GatedRmsNorm
func (t *Tensor) GatedRmsNorm(z *Tensor, normalizedShape []int64, weight *Tensor, epsHas bool, eps float64) (*Tensor, error)
GatedRmsNorm: the `gated_rms_norm` operator; delegates to Api.OpGatedRmsNorm. Non-consuming (retain-before-consuming-op).
Gather
func (t *Tensor) Gather(dim int64, index *Tensor) (*Tensor, error)
Gather: the `gather` operator; delegates to Api.OpGather. Non-consuming (retain-before-consuming-op).
Ge
func (t *Tensor) Ge(other ScalarOrTensor) (*Tensor, error)
Ge: the `ge` operator; delegates to Api.OpGe. Non-consuming (retain-before-consuming-op).
Ge_
func (t *Tensor) Ge_(other ScalarOrTensor) (*Tensor, error)
Ge_: the `ge_` operator; delegates to Api.OpGeInplace. Returns the receiver so in-place calls chain.
Geglu
func (t *Tensor) Geglu(approximate GeluMode) (*Tensor, error)
Geglu: the `geglu` operator; delegates to Api.OpGeglu. Non-consuming (retain-before-consuming-op).
Gelu
func (t *Tensor) Gelu(approximate GeluMode) (*Tensor, error)
Gelu: the `gelu` operator; delegates to Api.OpGelu. Non-consuming (retain-before-consuming-op).
Gelu_
func (t *Tensor) Gelu_(approximate GeluMode) (*Tensor, error)
Gelu_: the `gelu_` operator; delegates to Api.OpGeluInplace. Returns the receiver so in-place calls chain.
Glu
func (t *Tensor) Glu(dim int64) (*Tensor, error)
Glu: the `glu` operator; delegates to Api.OpGlu. Non-consuming (retain-before-consuming-op).
GridSample
func (t *Tensor) GridSample(grid *Tensor, mode GridSampleMode, paddingMode GridSamplePaddingMode, alignCorners bool) (*Tensor, error)
GridSample: the `grid_sample` operator; delegates to Api.OpGridSample. Non-consuming (retain-before-consuming-op).
GroupNorm
func (t *Tensor) GroupNorm(numGroups int64, weight *Tensor, bias *Tensor, runningMean *Tensor, runningVar *Tensor, epsHas bool, eps float64, activationHas bool, activation Activation) (*Tensor, error)
GroupNorm: the `group_norm` operator; delegates to Api.OpGroupNorm. Non-consuming (retain-before-consuming-op).
GroupQueryAttention
func (t *Tensor) GroupQueryAttention(k *Tensor, v *Tensor, pastKey *Tensor, pastValue *Tensor, kvcacheStart *Tensor, ropeCos *Tensor, ropeSin *Tensor, positionIds *Tensor, attnMask *Tensor, qScale ScalarOrTensor, outPresentKey *Tensor, outPresentValue *Tensor, kScale ScalarOrTensor, vScale ScalarOrTensor, headSink *Tensor, qNormGain *Tensor, kNormGain *Tensor, slotIds *Tensor, opts *GroupQueryAttentionOptions) (*Tensor, *Tensor, *Tensor, error)
GroupQueryAttention: the `group_query_attention` operator; delegates to Api.OpGroupQueryAttention. Non-consuming (retain-before-consuming-op).
GroupQueryAttentionVarlen
func (t *Tensor) GroupQueryAttentionVarlen(k *Tensor, v *Tensor, cuSeqlensQ *Tensor, cuSeqlensK *Tensor, maxSeqlenQ ScalarOrTensor, maxSeqlenK ScalarOrTensor, pastKey *Tensor, pastValue *Tensor, kvcacheStart *Tensor, ropeCos *Tensor, ropeSin *Tensor, positionIds *Tensor, attnMask *Tensor, headSink *Tensor, qScale ScalarOrTensor, outPresentKey *Tensor, outPresentValue *Tensor, kScale ScalarOrTensor, vScale ScalarOrTensor, qNormGain *Tensor, kNormGain *Tensor, slotIds *Tensor, opts *GroupQueryAttentionVarlenOptions) (*Tensor, *Tensor, *Tensor, error)
GroupQueryAttentionVarlen: the `group_query_attention_varlen` operator; delegates to Api.OpGroupQueryAttentionVarlen. Non-consuming (retain-before-consuming-op).
Gt
func (t *Tensor) Gt(other ScalarOrTensor) (*Tensor, error)
Gt: the `gt` operator; delegates to Api.OpGt. Non-consuming (retain-before-consuming-op).
Gt_
func (t *Tensor) Gt_(other ScalarOrTensor) (*Tensor, error)
Gt_: the `gt_` operator; delegates to Api.OpGtInplace. Returns the receiver so in-place calls chain.
Hardshrink
func (t *Tensor) Hardshrink(lambd float64) (*Tensor, error)
Hardshrink: the `hardshrink` operator; delegates to Api.OpHardshrink. Non-consuming (retain-before-consuming-op).
Hardshrink_
func (t *Tensor) Hardshrink_(lambd float64) (*Tensor, error)
Hardshrink_: the `hardshrink_` operator; delegates to Api.OpHardshrinkInplace. Returns the receiver so in-place calls chain.
Hardsigmoid
func (t *Tensor) Hardsigmoid() (*Tensor, error)
Hardsigmoid: the `hardsigmoid` operator; delegates to Api.OpHardsigmoid. Non-consuming (retain-before-consuming-op).
Hardsigmoid_
func (t *Tensor) Hardsigmoid_() (*Tensor, error)
Hardsigmoid_: the `hardsigmoid_` operator; delegates to Api.OpHardsigmoidInplace. Returns the receiver so in-place calls chain.
Hardswish
func (t *Tensor) Hardswish() (*Tensor, error)
Hardswish: the `hardswish` operator; delegates to Api.OpHardswish. Non-consuming (retain-before-consuming-op).
Hardswish_
func (t *Tensor) Hardswish_() (*Tensor, error)
Hardswish_: the `hardswish_` operator; delegates to Api.OpHardswishInplace. Returns the receiver so in-place calls chain.
Hardtanh
func (t *Tensor) Hardtanh(minVal float64, maxVal float64) (*Tensor, error)
Hardtanh: the `hardtanh` operator; delegates to Api.OpHardtanh. Non-consuming (retain-before-consuming-op).
Hardtanh_
func (t *Tensor) Hardtanh_(minVal float64, maxVal float64) (*Tensor, error)
Hardtanh_: the `hardtanh_` operator; delegates to Api.OpHardtanhInplace. Returns the receiver so in-place calls chain.
Hash128
func (t *Tensor) Hash128(seed uint64) (*Tensor, error)
Hash128: the `hash_128` operator; delegates to Api.OpHash128. Non-consuming (retain-before-consuming-op).
Hash256
func (t *Tensor) Hash256(seed uint64) (*Tensor, error)
Hash256: the `hash_256` operator; delegates to Api.OpHash256. Non-consuming (retain-before-consuming-op).
Hash64
func (t *Tensor) Hash64(seed uint64) (*Tensor, error)
Hash64: the `hash_64` operator; delegates to Api.OpHash64. Non-consuming (retain-before-consuming-op).
HashTensor
func (t *Tensor) HashTensor(dims []int64, keepdim bool, mode HashTensorMode) (*Tensor, error)
HashTensor: the `hash_tensor` operator; delegates to Api.OpHashTensor. Non-consuming (retain-before-consuming-op).
Histogram
func (t *Tensor) Histogram(bins int64, range_ *Tensor, weight *Tensor, density bool) (*Tensor, *Tensor, error)
Histogram: the `histogram` operator; delegates to Api.OpHistogram. Non-consuming (retain-before-consuming-op).
HuberLoss
func (t *Tensor) HuberLoss(target *Tensor, reduction Reduction, delta float64) (*Tensor, error)
HuberLoss: the `huber_loss` operator; delegates to Api.OpHuberLoss. Non-consuming (retain-before-consuming-op).
Hypot
func (t *Tensor) Hypot(b *Tensor) (*Tensor, error)
Hypot: the `hypot` operator; delegates to Api.OpHypot. Non-consuming (retain-before-consuming-op).
Hypot_
func (t *Tensor) Hypot_(other *Tensor) (*Tensor, error)
Hypot_: the `hypot_` operator; delegates to Api.OpHypotInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
Index
func (t *Tensor) Index(indices []IndexEntry) (*Tensor, error)
Index: the `index` operator; delegates to Api.OpIndex. Non-consuming (retain-before-consuming-op).
IndexAdd
func (t *Tensor) IndexAdd(dim int64, indices *Tensor, src *Tensor) (*Tensor, error)
IndexAdd: the `index_add` operator; delegates to Api.OpIndexAdd. Non-consuming (retain-before-consuming-op).
IndexAdd_
func (t *Tensor) IndexAdd_(dim int64, indices *Tensor, src *Tensor) (*Tensor, error)
IndexAdd_: the `index_add_` operator; delegates to Api.OpIndexAddInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
IndexCopy
func (t *Tensor) IndexCopy(dim int64, indices *Tensor, src *Tensor) (*Tensor, error)
IndexCopy: the `index_copy` operator; delegates to Api.OpIndexCopy. Non-consuming (retain-before-consuming-op).
IndexCopy_
func (t *Tensor) IndexCopy_(dim int64, indices *Tensor, src *Tensor) (*Tensor, error)
IndexCopy_: the `index_copy_` operator; delegates to Api.OpIndexCopyInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
IndexFill
func (t *Tensor) IndexFill(dim int64, indices *Tensor, value ScalarOrTensor) (*Tensor, error)
IndexFill: the `index_fill` operator; delegates to Api.OpIndexFill. Non-consuming (retain-before-consuming-op).
IndexFill_
func (t *Tensor) IndexFill_(dim int64, indices *Tensor, value ScalarOrTensor) (*Tensor, error)
IndexFill_: the `index_fill_` operator; delegates to Api.OpIndexFillInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
IndexPut
func (t *Tensor) IndexPut(indices []IndexEntry, value ScalarOrTensor, accumulate bool) (*Tensor, error)
IndexPut: the `index_put` operator; delegates to Api.OpIndexPut. Non-consuming (retain-before-consuming-op).
IndexPut_
func (t *Tensor) IndexPut_(indices []IndexEntry, value ScalarOrTensor, accumulate bool) (*Tensor, error)
IndexPut_: the `index_put_` operator; delegates to Api.OpIndexPutInplace. Returns the receiver so in-place calls chain.
IndexSelect
func (t *Tensor) IndexSelect(dim int64, index *Tensor) (*Tensor, error)
IndexSelect: the `index_select` operator; delegates to Api.OpIndexSelect. Non-consuming (retain-before-consuming-op).
Inner
func (t *Tensor) Inner(b *Tensor) (*Tensor, error)
Inner: the `inner` operator; delegates to Api.OpInner. Non-consuming (retain-before-consuming-op).
InstanceNorm
func (t *Tensor) InstanceNorm(weight *Tensor, bias *Tensor, runningMean *Tensor, runningVar *Tensor, epsHas bool, eps float64, activationHas bool, activation Activation) (*Tensor, error)
InstanceNorm: the `instance_norm` operator; delegates to Api.OpInstanceNorm. Non-consuming (retain-before-consuming-op).
Interpolate
func (t *Tensor) Interpolate(sizes []ScalarOrTensor, scaleFactors []ScalarOrTensor, mode InterpMode, alignCornersHas bool, alignCorners bool, recomputeScaleFactor bool, antialias bool) (*Tensor, error)
Interpolate: the `interpolate` operator; delegates to Api.OpInterpolate. Non-consuming (retain-before-consuming-op).
Isclose
func (t *Tensor) Isclose(b *Tensor, rtol float64, atol float64, equalNan bool) (*Tensor, error)
Isclose: the `isclose` operator; delegates to Api.OpIsclose. Non-consuming (retain-before-consuming-op).
Isfinite
func (t *Tensor) Isfinite() (*Tensor, error)
Isfinite: the `isfinite` operator; delegates to Api.OpIsfinite. Non-consuming (retain-before-consuming-op).
Isinf
func (t *Tensor) Isinf() (*Tensor, error)
Isinf: the `isinf` operator; delegates to Api.OpIsinf. Non-consuming (retain-before-consuming-op).
Isnan
func (t *Tensor) Isnan() (*Tensor, error)
Isnan: the `isnan` operator; delegates to Api.OpIsnan. Non-consuming (retain-before-consuming-op).
Isneginf
func (t *Tensor) Isneginf() (*Tensor, error)
Isneginf: the `isneginf` operator; delegates to Api.OpIsneginf. Non-consuming (retain-before-consuming-op).
Isposinf
func (t *Tensor) Isposinf() (*Tensor, error)
Isposinf: the `isposinf` operator; delegates to Api.OpIsposinf. Non-consuming (retain-before-consuming-op).
KlDiv
func (t *Tensor) KlDiv(target *Tensor, reduction Reduction, logTarget bool) (*Tensor, error)
KlDiv: the `kl_div` operator; delegates to Api.OpKlDiv. Non-consuming (retain-before-consuming-op).
Kron
func (t *Tensor) Kron(b *Tensor) (*Tensor, error)
Kron: the `kron` operator; delegates to Api.OpKron. Non-consuming (retain-before-consuming-op).
Kthvalue
func (t *Tensor) Kthvalue(k int64, dim int64, keepdim bool) (*Tensor, *Tensor, error)
Kthvalue: the `kthvalue` operator; delegates to Api.OpKthvalue. Non-consuming (retain-before-consuming-op).
L1Loss
func (t *Tensor) L1Loss(target *Tensor, reduction Reduction) (*Tensor, error)
L1Loss: the `l1_loss` operator; delegates to Api.OpL1Loss. Non-consuming (retain-before-consuming-op).
LayerNorm
func (t *Tensor) LayerNorm(normalizedShape []int64, weight *Tensor, bias *Tensor, epsHas bool, eps float64, activationHas bool, activation Activation) (*Tensor, error)
LayerNorm: the `layer_norm` operator; delegates to Api.OpLayerNorm. Non-consuming (retain-before-consuming-op).
Le
func (t *Tensor) Le(other ScalarOrTensor) (*Tensor, error)
Le: the `le` operator; delegates to Api.OpLe. Non-consuming (retain-before-consuming-op).
Le_
func (t *Tensor) Le_(other ScalarOrTensor) (*Tensor, error)
Le_: the `le_` operator; delegates to Api.OpLeInplace. Returns the receiver so in-place calls chain.
LeakyRelu
func (t *Tensor) LeakyRelu(negativeSlope float64) (*Tensor, error)
LeakyRelu: the `leaky_relu` operator; delegates to Api.OpLeakyRelu. Non-consuming (retain-before-consuming-op).
LeakyRelu_
func (t *Tensor) LeakyRelu_(negativeSlope float64) (*Tensor, error)
LeakyRelu_: the `leaky_relu_` operator; delegates to Api.OpLeakyReluInplace. Returns the receiver so in-place calls chain.
Linear
func (t *Tensor) Linear(weight *Tensor, bias *Tensor, activationHas bool, activation Activation, situBeta float64, situLinearBeta float64) (*Tensor, error)
Linear: the `linear` operator; delegates to Api.OpLinear. Non-consuming (retain-before-consuming-op).
Log
func (t *Tensor) Log() (*Tensor, error)
Log: the `log` operator; delegates to Api.OpLog. Non-consuming (retain-before-consuming-op).
Log10
func (t *Tensor) Log10() (*Tensor, error)
Log10: the `log10` operator; delegates to Api.OpLog10. Non-consuming (retain-before-consuming-op).
Log10_
func (t *Tensor) Log10_() (*Tensor, error)
Log10_: the `log10_` operator; delegates to Api.OpLog10Inplace. Returns the receiver so in-place calls chain.
Log1p
func (t *Tensor) Log1p() (*Tensor, error)
Log1p: the `log1p` operator; delegates to Api.OpLog1p. Non-consuming (retain-before-consuming-op).
Log1p_
func (t *Tensor) Log1p_() (*Tensor, error)
Log1p_: the `log1p_` operator; delegates to Api.OpLog1pInplace. Returns the receiver so in-place calls chain.
Log2
func (t *Tensor) Log2() (*Tensor, error)
Log2: the `log2` operator; delegates to Api.OpLog2. Non-consuming (retain-before-consuming-op).
Log2_
func (t *Tensor) Log2_() (*Tensor, error)
Log2_: the `log2_` operator; delegates to Api.OpLog2Inplace. Returns the receiver so in-place calls chain.
LogSigmoid
func (t *Tensor) LogSigmoid() (*Tensor, error)
LogSigmoid: the `log_sigmoid` operator; delegates to Api.OpLogSigmoid. Non-consuming (retain-before-consuming-op).
LogSigmoid_
func (t *Tensor) LogSigmoid_() (*Tensor, error)
LogSigmoid_: the `log_sigmoid_` operator; delegates to Api.OpLogSigmoidInplace. Returns the receiver so in-place calls chain.
LogSoftmax
func (t *Tensor) LogSoftmax(dim int64, dtype DataType) (*Tensor, error)
LogSoftmax: the `log_softmax` operator; delegates to Api.OpLogSoftmax. Non-consuming (retain-before-consuming-op).
LogSoftmax_
func (t *Tensor) LogSoftmax_(dim int64) (*Tensor, error)
LogSoftmax_: the `log_softmax_` operator; delegates to Api.OpLogSoftmaxInplace. Returns the receiver so in-place calls chain.
Log_
func (t *Tensor) Log_() (*Tensor, error)
Log_: the `log_` operator; delegates to Api.OpLogInplace. Returns the receiver so in-place calls chain.
Logaddexp
func (t *Tensor) Logaddexp(b *Tensor) (*Tensor, error)
Logaddexp: the `logaddexp` operator; delegates to Api.OpLogaddexp. Non-consuming (retain-before-consuming-op).
Logaddexp2
func (t *Tensor) Logaddexp2(b *Tensor) (*Tensor, error)
Logaddexp2: the `logaddexp2` operator; delegates to Api.OpLogaddexp2. Non-consuming (retain-before-consuming-op).
LogicalAnd
func (t *Tensor) LogicalAnd(b *Tensor) (*Tensor, error)
LogicalAnd: the `logical_and` operator; delegates to Api.OpLogicalAnd. Non-consuming (retain-before-consuming-op).
LogicalAnd_
func (t *Tensor) LogicalAnd_(other *Tensor) (*Tensor, error)
LogicalAnd_: the `logical_and_` operator; delegates to Api.OpLogicalAndInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
LogicalNot
func (t *Tensor) LogicalNot() (*Tensor, error)
LogicalNot: the `logical_not` operator; delegates to Api.OpLogicalNot. Non-consuming (retain-before-consuming-op).
LogicalNot_
func (t *Tensor) LogicalNot_() (*Tensor, error)
LogicalNot_: the `logical_not_` operator; delegates to Api.OpLogicalNotInplace. Returns the receiver so in-place calls chain.
LogicalOr
func (t *Tensor) LogicalOr(b *Tensor) (*Tensor, error)
LogicalOr: the `logical_or` operator; delegates to Api.OpLogicalOr. Non-consuming (retain-before-consuming-op).
LogicalOr_
func (t *Tensor) LogicalOr_(other *Tensor) (*Tensor, error)
LogicalOr_: the `logical_or_` operator; delegates to Api.OpLogicalOrInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
LogicalXor
func (t *Tensor) LogicalXor(b *Tensor) (*Tensor, error)
LogicalXor: the `logical_xor` operator; delegates to Api.OpLogicalXor. Non-consuming (retain-before-consuming-op).
LogicalXor_
func (t *Tensor) LogicalXor_(other *Tensor) (*Tensor, error)
LogicalXor_: the `logical_xor_` operator; delegates to Api.OpLogicalXorInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
Logit
func (t *Tensor) Logit(epsHas bool, eps float64) (*Tensor, error)
Logit: the `logit` operator; delegates to Api.OpLogit. Non-consuming (retain-before-consuming-op).
Logit_
func (t *Tensor) Logit_(epsHas bool, eps float64) (*Tensor, error)
Logit_: the `logit_` operator; delegates to Api.OpLogitInplace. Returns the receiver so in-place calls chain.
Logsumexp
func (t *Tensor) Logsumexp(dims []int64, keepdim bool) (*Tensor, error)
Logsumexp: the `logsumexp` operator; delegates to Api.OpLogsumexp. Non-consuming (retain-before-consuming-op).
Lt
func (t *Tensor) Lt(other ScalarOrTensor) (*Tensor, error)
Lt: the `lt` operator; delegates to Api.OpLt. Non-consuming (retain-before-consuming-op).
Lt_
func (t *Tensor) Lt_(other ScalarOrTensor) (*Tensor, error)
Lt_: the `lt_` operator; delegates to Api.OpLtInplace. Returns the receiver so in-place calls chain.
MaskedFill
func (t *Tensor) MaskedFill(mask *Tensor, value ScalarOrTensor) (*Tensor, error)
MaskedFill: the `masked_fill` operator; delegates to Api.OpMaskedFill. Non-consuming (retain-before-consuming-op).
MaskedFill_
func (t *Tensor) MaskedFill_(mask *Tensor, value ScalarOrTensor) (*Tensor, error)
MaskedFill_: the `masked_fill_` operator; delegates to Api.OpMaskedFillInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
MaskedScatter
func (t *Tensor) MaskedScatter(mask *Tensor, source *Tensor) (*Tensor, error)
MaskedScatter: the `masked_scatter` operator; delegates to Api.OpMaskedScatter. Non-consuming (retain-before-consuming-op).
MaskedScatter_
func (t *Tensor) MaskedScatter_(mask *Tensor, source *Tensor) (*Tensor, error)
MaskedScatter_: the `masked_scatter_` operator; delegates to Api.OpMaskedScatterInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
MaskedSelect
func (t *Tensor) MaskedSelect(mask *Tensor) (*Tensor, error)
MaskedSelect: the `masked_select` operator; delegates to Api.OpMaskedSelect. Non-consuming (retain-before-consuming-op).
Matmul
func (t *Tensor) Matmul(b *Tensor, bias *Tensor, activationHas bool, activation Activation, transposeA bool, transposeB bool, situBeta float64, situLinearBeta float64) (*Tensor, error)
Matmul: the `matmul` operator; delegates to Api.OpMatmul. Non-consuming (retain-before-consuming-op).
Max
func (t *Tensor) Max(dim int64, keepdim bool) (*Tensor, *Tensor, error)
Max: the `max` operator; delegates to Api.OpMax. Non-consuming (retain-before-consuming-op).
MaxPool
func (t *Tensor) MaxPool(kernelSize []int64, stride []int64, padding []int64, dilation []int64, ceilMode bool) (*Tensor, error)
MaxPool: the `max_pool` operator; delegates to Api.OpMaxPool. Non-consuming (retain-before-consuming-op).
MaxPool1d
func (t *Tensor) MaxPool1d(kernelSize []int64, stride []int64, padding []int64, dilation []int64, ceilMode bool) (*Tensor, error)
MaxPool1d: the `max_pool1d` operator; delegates to Api.OpMaxPool1d. Non-consuming (retain-before-consuming-op).
MaxPool1dWithIndices
func (t *Tensor) MaxPool1dWithIndices(kernelSize []int64, stride []int64, padding []int64, dilation []int64, ceilMode bool) (*Tensor, *Tensor, error)
MaxPool1dWithIndices: the `max_pool1d_with_indices` operator; delegates to Api.OpMaxPool1dWithIndices. Non-consuming (retain-before-consuming-op).
MaxPool2d
func (t *Tensor) MaxPool2d(kernelSize []int64, stride []int64, padding []int64, dilation []int64, ceilMode bool) (*Tensor, error)
MaxPool2d: the `max_pool2d` operator; delegates to Api.OpMaxPool2d. Non-consuming (retain-before-consuming-op).
MaxPool2dWithIndices
func (t *Tensor) MaxPool2dWithIndices(kernelSize []int64, stride []int64, padding []int64, dilation []int64, ceilMode bool) (*Tensor, *Tensor, error)
MaxPool2dWithIndices: the `max_pool2d_with_indices` operator; delegates to Api.OpMaxPool2dWithIndices. Non-consuming (retain-before-consuming-op).
MaxPool3d
func (t *Tensor) MaxPool3d(kernelSize []int64, stride []int64, padding []int64, dilation []int64, ceilMode bool) (*Tensor, error)
MaxPool3d: the `max_pool3d` operator; delegates to Api.OpMaxPool3d. Non-consuming (retain-before-consuming-op).
MaxPool3dWithIndices
func (t *Tensor) MaxPool3dWithIndices(kernelSize []int64, stride []int64, padding []int64, dilation []int64, ceilMode bool) (*Tensor, *Tensor, error)
MaxPool3dWithIndices: the `max_pool3d_with_indices` operator; delegates to Api.OpMaxPool3dWithIndices. Non-consuming (retain-before-consuming-op).
MaxPoolWithIndices
func (t *Tensor) MaxPoolWithIndices(kernelSize []int64, stride []int64, padding []int64, dilation []int64, ceilMode bool) (*Tensor, *Tensor, error)
MaxPoolWithIndices: the `max_pool_with_indices` operator; delegates to Api.OpMaxPoolWithIndices. Non-consuming (retain-before-consuming-op).
Maximum
func (t *Tensor) Maximum(b *Tensor) (*Tensor, error)
Maximum: the `maximum` operator; delegates to Api.OpMaximum. Non-consuming (retain-before-consuming-op).
Maximum_
func (t *Tensor) Maximum_(other *Tensor) (*Tensor, error)
Maximum_: the `maximum_` operator; delegates to Api.OpMaximumInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
Mean
func (t *Tensor) Mean(dims []int64, keepdim bool, dtype DataType) (*Tensor, error)
Mean: the `mean` operator; delegates to Api.OpMean. Non-consuming (retain-before-consuming-op).
Median
func (t *Tensor) Median(dimHas bool, dim int64, keepdim bool) (*Tensor, *Tensor, error)
Median: the `median` operator; delegates to Api.OpMedian. Non-consuming (retain-before-consuming-op).
Min
func (t *Tensor) Min(dim int64, keepdim bool) (*Tensor, *Tensor, error)
Min: the `min` operator; delegates to Api.OpMin. Non-consuming (retain-before-consuming-op).
Minimum
func (t *Tensor) Minimum(b *Tensor) (*Tensor, error)
Minimum: the `minimum` operator; delegates to Api.OpMinimum. Non-consuming (retain-before-consuming-op).
Minimum_
func (t *Tensor) Minimum_(other *Tensor) (*Tensor, error)
Minimum_: the `minimum_` operator; delegates to Api.OpMinimumInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
Mish
func (t *Tensor) Mish() (*Tensor, error)
Mish: the `mish` operator; delegates to Api.OpMish. Non-consuming (retain-before-consuming-op).
Mish_
func (t *Tensor) Mish_() (*Tensor, error)
Mish_: the `mish_` operator; delegates to Api.OpMishInplace. Returns the receiver so in-place calls chain.
Mm
func (t *Tensor) Mm(b *Tensor, bias *Tensor, activationHas bool, activation Activation) (*Tensor, error)
Mm: the `mm` operator; delegates to Api.OpMm. Non-consuming (retain-before-consuming-op).
Mod
func (t *Tensor) Mod(other ScalarOrTensor, mode ModMode) (*Tensor, error)
Mod: the `mod` operator; delegates to Api.OpMod. Non-consuming (retain-before-consuming-op).
Mod_
func (t *Tensor) Mod_(other ScalarOrTensor, mode ModMode) (*Tensor, error)
Mod_: the `mod_` operator; delegates to Api.OpModInplace. Returns the receiver so in-place calls chain.
Moe
func (t *Tensor) Moe(routerLogits *Tensor, fc1Experts *Tensor, fc2Experts *Tensor, topK int64, fc1Bias *Tensor, fc2Bias *Tensor, fc3Experts *Tensor, fc3Bias *Tensor, eScoreCorrectionBias *Tensor, routerWeights *Tensor, sharedOutput *Tensor, opts *MoeOptions) (*Tensor, error)
Moe: the `moe` operator; delegates to Api.OpMoe. Non-consuming (retain-before-consuming-op).
MropeRotaryEmbeddingQkVarlen
func (t *Tensor) MropeRotaryEmbeddingQkVarlen(k *Tensor, positionIds *Tensor, mropeSections []int64, opts *MropeRotaryEmbeddingQkVarlenOptions) (*Tensor, *Tensor, error)
MropeRotaryEmbeddingQkVarlen: the `mrope_rotary_embedding_qk_varlen` operator; delegates to Api.OpMropeRotaryEmbeddingQkVarlen. Non-consuming (retain-before-consuming-op).
MseLoss
func (t *Tensor) MseLoss(target *Tensor, reduction Reduction) (*Tensor, error)
MseLoss: the `mse_loss` operator; delegates to Api.OpMseLoss. Non-consuming (retain-before-consuming-op).
MulTensor
func (t *Tensor) MulTensor(other ScalarOrTensor, activation Activation) (*Tensor, error)
MulTensor: the `mul_tensor` operator; delegates to Api.OpMulTensor. Non-consuming (retain-before-consuming-op).
Mul_
func (t *Tensor) Mul_(other ScalarOrTensor, activation Activation) (*Tensor, error)
Mul_: the `mul_` operator; delegates to Api.OpMulInplace. Returns the receiver so in-place calls chain.
Mv
func (t *Tensor) Mv(vec *Tensor, bias *Tensor, activationHas bool, activation Activation) (*Tensor, error)
Mv: the `mv` operator; delegates to Api.OpMv. Non-consuming (retain-before-consuming-op).
NanToNum
func (t *Tensor) NanToNum(nanHas bool, nan float64, posinfHas bool, posinf float64, neginfHas bool, neginf float64) (*Tensor, error)
NanToNum: the `nan_to_num` operator; delegates to Api.OpNanToNum. Non-consuming (retain-before-consuming-op).
NanToNum_
func (t *Tensor) NanToNum_(nanHas bool, nan float64, posinfHas bool, posinf float64, neginfHas bool, neginf float64) (*Tensor, error)
NanToNum_: the `nan_to_num_` operator; delegates to Api.OpNanToNumInplace. Returns the receiver so in-place calls chain.
Nanmean
func (t *Tensor) Nanmean(dims []int64, keepdim bool) (*Tensor, error)
Nanmean: the `nanmean` operator; delegates to Api.OpNanmean. Non-consuming (retain-before-consuming-op).
Nanmedian
func (t *Tensor) Nanmedian(dimHas bool, dim int64, keepdim bool) (*Tensor, *Tensor, error)
Nanmedian: the `nanmedian` operator; delegates to Api.OpNanmedian. Non-consuming (retain-before-consuming-op).
Nanquantile
func (t *Tensor) Nanquantile(q ScalarOrTensor, dimHas bool, dim int64, keepdim bool, interpolation QuantileInterp) (*Tensor, error)
Nanquantile: the `nanquantile` operator; delegates to Api.OpNanquantile. Non-consuming (retain-before-consuming-op).
Nansum
func (t *Tensor) Nansum(dims []int64, keepdim bool) (*Tensor, error)
Nansum: the `nansum` operator; delegates to Api.OpNansum. Non-consuming (retain-before-consuming-op).
Narrow
func (t *Tensor) Narrow(dim int64, start IndexBound, length IndexBound) (*Tensor, error)
Narrow: the `narrow` operator; delegates to Api.OpNarrow. Non-consuming (retain-before-consuming-op).
Ndim
func (t *Tensor) Ndim() (*Tensor, error)
Ndim: the `ndim` operator; delegates to Api.OpNdim. Non-consuming (retain-before-consuming-op).
NdimHost
func (t *Tensor) NdimHost() (*Tensor, error)
NdimHost: the `ndim_host` operator; delegates to Api.OpNdimHost. Non-consuming (retain-before-consuming-op).
Ne
func (t *Tensor) Ne(other ScalarOrTensor) (*Tensor, error)
Ne: the `ne` operator; delegates to Api.OpNe. Non-consuming (retain-before-consuming-op).
Ne_
func (t *Tensor) Ne_(other ScalarOrTensor) (*Tensor, error)
Ne_: the `ne_` operator; delegates to Api.OpNeInplace. Returns the receiver so in-place calls chain.
Neg
func (t *Tensor) Neg() (*Tensor, error)
Neg: the `neg` operator; delegates to Api.OpNeg. Non-consuming (retain-before-consuming-op).
Neg_
func (t *Tensor) Neg_() (*Tensor, error)
Neg_: the `neg_` operator; delegates to Api.OpNegInplace. Returns the receiver so in-place calls chain.
NllLoss
func (t *Tensor) NllLoss(target *Tensor, weight *Tensor, ignoreIndexHas bool, ignoreIndex int64, reduction Reduction) (*Tensor, error)
NllLoss: the `nll_loss` operator; delegates to Api.OpNllLoss. Non-consuming (retain-before-consuming-op).
Nonzero
func (t *Tensor) Nonzero() (*Tensor, error)
Nonzero: the `nonzero` operator; delegates to Api.OpNonzero. Non-consuming (retain-before-consuming-op).
Norm
func (t *Tensor) Norm(p Scalar, dims []int64, keepdim bool) (*Tensor, error)
Norm: the `norm` operator; delegates to Api.OpNorm. Non-consuming (retain-before-consuming-op).
Normal_
func (t *Tensor) Normal_(mean ScalarOrTensor, stddev ScalarOrTensor, s StreamOrDevice) (*Tensor, error)
Normal_: the `normal_` operator; delegates to Api.OpNormalInplace. Returns the receiver so in-place calls chain.
Normalize
func (t *Tensor) Normalize(p Scalar, dim int64, epsHas bool, eps float64) (*Tensor, error)
Normalize: the `normalize` operator; delegates to Api.OpNormalize. Non-consuming (retain-before-consuming-op).
Normalize_
func (t *Tensor) Normalize_(p Scalar, dim int64, epsHas bool, eps float64) (*Tensor, error)
Normalize_: the `normalize_` operator; delegates to Api.OpNormalizeInplace. Returns the receiver so in-place calls chain.
Numel
func (t *Tensor) Numel() (*Tensor, error)
Numel: the `numel` operator; delegates to Api.OpNumel. Non-consuming (retain-before-consuming-op).
NumelHost
func (t *Tensor) NumelHost() (*Tensor, error)
NumelHost: the `numel_host` operator; delegates to Api.OpNumelHost. Non-consuming (retain-before-consuming-op).
Outer
func (t *Tensor) Outer(b *Tensor) (*Tensor, error)
Outer: the `outer` operator; delegates to Api.OpOuter. Non-consuming (retain-before-consuming-op).
Pad
func (t *Tensor) Pad(pad []ScalarOrTensor, mode PadMode, value ScalarOrTensor) (*Tensor, error)
Pad: the `pad` operator; delegates to Api.OpPad. Non-consuming (retain-before-consuming-op).
PairwiseDistance
func (t *Tensor) PairwiseDistance(b *Tensor, p Scalar, epsHas bool, eps float64, keepdim bool) (*Tensor, error)
PairwiseDistance: the `pairwise_distance` operator; delegates to Api.OpPairwiseDistance. Non-consuming (retain-before-consuming-op).
Pdist
func (t *Tensor) Pdist(p Scalar) (*Tensor, error)
Pdist: the `pdist` operator; delegates to Api.OpPdist. Non-consuming (retain-before-consuming-op).
Permute
func (t *Tensor) Permute(dims []int64) (*Tensor, error)
Permute: the `permute` operator; delegates to Api.OpPermute. Non-consuming (retain-before-consuming-op).
PixelShuffle
func (t *Tensor) PixelShuffle(upscaleFactor int64, mode PixelShuffleMode) (*Tensor, error)
PixelShuffle: the `pixel_shuffle` operator; delegates to Api.OpPixelShuffle. Non-consuming (retain-before-consuming-op).
PixelUnshuffle
func (t *Tensor) PixelUnshuffle(downscaleFactor int64, mode PixelShuffleMode) (*Tensor, error)
PixelUnshuffle: the `pixel_unshuffle` operator; delegates to Api.OpPixelUnshuffle. Non-consuming (retain-before-consuming-op).
Pow
func (t *Tensor) Pow(exponent ScalarOrTensor) (*Tensor, error)
Pow: the `pow` operator; delegates to Api.OpPow. Non-consuming (retain-before-consuming-op).
Pow_
func (t *Tensor) Pow_(exponent ScalarOrTensor) (*Tensor, error)
Pow_: the `pow_` operator; delegates to Api.OpPowInplace. Returns the receiver so in-place calls chain.
Prelu
func (t *Tensor) Prelu(weight *Tensor) (*Tensor, error)
Prelu: the `prelu` operator; delegates to Api.OpPrelu. Non-consuming (retain-before-consuming-op).
Prelu_
func (t *Tensor) Prelu_(weight *Tensor) (*Tensor, error)
Prelu_: the `prelu_` operator; delegates to Api.OpPreluInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
Prod
func (t *Tensor) Prod(dims []int64, keepdim bool, dtype DataType) (*Tensor, error)
Prod: the `prod` operator; delegates to Api.OpProd. Non-consuming (retain-before-consuming-op).
Put
func (t *Tensor) Put(index *Tensor, source *Tensor, accumulate bool) (*Tensor, error)
Put: the `put` operator; delegates to Api.OpPut. Non-consuming (retain-before-consuming-op).
Put_
func (t *Tensor) Put_(index *Tensor, source *Tensor, accumulate bool) (*Tensor, error)
Put_: the `put_` operator; delegates to Api.OpPutInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
Qconv1dWoq
func (t *Tensor) Qconv1dWoq(weight *QTensor, bias *Tensor, stride []int64, padding []int64, dilation []int64, groups int64, activation Activation) (*Tensor, error)
Qconv1dWoq: the `qconv1d_woq` operator; delegates to Api.OpQconv1dWoq. Non-consuming (retain-before-consuming-op).
Qconv2dWoq
func (t *Tensor) Qconv2dWoq(weight *QTensor, bias *Tensor, stride []int64, padding []int64, dilation []int64, groups int64, activation Activation) (*Tensor, error)
Qconv2dWoq: the `qconv2d_woq` operator; delegates to Api.OpQconv2dWoq. Non-consuming (retain-before-consuming-op).
Qconv3dWoq
func (t *Tensor) Qconv3dWoq(weight *QTensor, bias *Tensor, stride []int64, padding []int64, dilation []int64, groups int64, activation Activation) (*Tensor, error)
Qconv3dWoq: the `qconv3d_woq` operator; delegates to Api.OpQconv3dWoq. Non-consuming (retain-before-consuming-op).
QconvTranspose1dWoq
func (t *Tensor) QconvTranspose1dWoq(weight *QTensor, bias *Tensor, opts *QconvTranspose1dWoqOptions) (*Tensor, error)
QconvTranspose1dWoq: the `qconv_transpose1d_woq` operator; delegates to Api.OpQconvTranspose1dWoq. Non-consuming (retain-before-consuming-op).
QconvTranspose2dWoq
func (t *Tensor) QconvTranspose2dWoq(weight *QTensor, bias *Tensor, opts *QconvTranspose2dWoqOptions) (*Tensor, error)
QconvTranspose2dWoq: the `qconv_transpose2d_woq` operator; delegates to Api.OpQconvTranspose2dWoq. Non-consuming (retain-before-consuming-op).
QconvTranspose3dWoq
func (t *Tensor) QconvTranspose3dWoq(weight *QTensor, bias *Tensor, opts *QconvTranspose3dWoqOptions) (*Tensor, error)
QconvTranspose3dWoq: the `qconv_transpose3d_woq` operator; delegates to Api.OpQconvTranspose3dWoq. Non-consuming (retain-before-consuming-op).
QconvTransposeWoq
func (t *Tensor) QconvTransposeWoq(weight *QTensor, bias *Tensor, opts *QconvTransposeWoqOptions) (*Tensor, error)
QconvTransposeWoq: the `qconv_transpose_woq` operator; delegates to Api.OpQconvTransposeWoq. Non-consuming (retain-before-consuming-op).
QconvWoq
func (t *Tensor) QconvWoq(weight *QTensor, bias *Tensor, opts *QconvWoqOptions) (*Tensor, error)
QconvWoq: the `qconv_woq` operator; delegates to Api.OpQconvWoq. Non-consuming (retain-before-consuming-op).
QdeformConvWoq
func (t *Tensor) QdeformConvWoq(weight *QTensor, offset *Tensor, mask *Tensor, bias *Tensor, opts *QdeformConvWoqOptions) (*Tensor, error)
QdeformConvWoq: the `qdeform_conv_woq` operator; delegates to Api.OpQdeformConvWoq. Non-consuming (retain-before-consuming-op).
QkLayerNorm
func (t *Tensor) QkLayerNorm(k *Tensor, v *Tensor, wQ *Tensor, bQ *Tensor, wK *Tensor, bK *Tensor, headDim int64, epsHas bool, eps float64) (*Tensor, *Tensor, *Tensor, error)
QkLayerNorm: the `qk_layer_norm` operator; delegates to Api.OpQkLayerNorm. Non-consuming (retain-before-consuming-op).
QkLayerNorm_
func (t *Tensor) QkLayerNorm_(k *Tensor, v *Tensor, wQ *Tensor, bQ *Tensor, wK *Tensor, bK *Tensor, headDim int64, epsHas bool, eps float64) (error)
QkLayerNorm_: the `qk_layer_norm_` operator; delegates to Api.OpQkLayerNormInplace. Non-consuming (retain-before-consuming-op).
QkRmsNorm
func (t *Tensor) QkRmsNorm(k *Tensor, v *Tensor, wQ *Tensor, wK *Tensor, headDim int64, epsHas bool, eps float64) (*Tensor, *Tensor, *Tensor, error)
QkRmsNorm: the `qk_rms_norm` operator; delegates to Api.OpQkRmsNorm. Non-consuming (retain-before-consuming-op).
QkRmsNorm_
func (t *Tensor) QkRmsNorm_(k *Tensor, v *Tensor, wQ *Tensor, wK *Tensor, headDim int64, epsHas bool, eps float64) (error)
QkRmsNorm_: the `qk_rms_norm_` operator; delegates to Api.OpQkRmsNormInplace. Non-consuming (retain-before-consuming-op).
QlinearWoq
func (t *Tensor) QlinearWoq(weight *QTensor, bias *Tensor, activationHas bool, activation Activation, computeMode QcomputeMode) (*Tensor, error)
QlinearWoq: the `qlinear_woq` operator; delegates to Api.OpQlinearWoq. Non-consuming (retain-before-consuming-op).
QlinearWoq_
func (t *Tensor) QlinearWoq_(weight *QTensor, out *Tensor, bias *Tensor, activationHas bool, activation Activation, computeMode QcomputeMode) (error)
QlinearWoq_: the `qlinear_woq_` operator; delegates to Api.OpQlinearWoqInplace. Non-consuming (retain-before-consuming-op).
QmatmulWoq
func (t *Tensor) QmatmulWoq(b *QTensor, bias *Tensor, activationHas bool, activation Activation, transposeA bool, transposeB bool, computeMode QcomputeMode) (*Tensor, error)
QmatmulWoq: the `qmatmul_woq` operator; delegates to Api.OpQmatmulWoq. Non-consuming (retain-before-consuming-op).
QmatmulWoq_
func (t *Tensor) QmatmulWoq_(b *QTensor, out *Tensor, bias *Tensor, activationHas bool, activation Activation, transposeA bool, transposeB bool, computeMode QcomputeMode) (error)
QmatmulWoq_: the `qmatmul_woq_` operator; delegates to Api.OpQmatmulWoqInplace. Non-consuming (retain-before-consuming-op).
QmoeWoq
func (t *Tensor) QmoeWoq(routerLogits *Tensor, fc1Experts *QTensor, fc2Experts *QTensor, topK int64, fc1Bias *Tensor, fc2Bias *Tensor, fc3Experts *QTensor, fc3Bias *Tensor, eScoreCorrectionBias *Tensor, routerWeights *Tensor, sharedOutput *Tensor, opts *QmoeWoqOptions) (*Tensor, error)
QmoeWoq: the `qmoe_woq` operator; delegates to Api.OpQmoeWoq. Non-consuming (retain-before-consuming-op).
Quantile
func (t *Tensor) Quantile(q ScalarOrTensor, dimHas bool, dim int64, keepdim bool, interpolation QuantileInterp) (*Tensor, error)
Quantile: the `quantile` operator; delegates to Api.OpQuantile. Non-consuming (retain-before-consuming-op).
Quantize
func (t *Tensor) Quantize(scale *Tensor, zeroPoint *Tensor, quantAxis int64, outDtype DataType, blockSize int64) (*QTensor, error)
Quantize: the `quantize` operator; delegates to Api.OpQuantize. Non-consuming (retain-before-consuming-op).
QuantizeDequantize
func (t *Tensor) QuantizeDequantize(scale *Tensor, zeroPoint *Tensor, quantAxis int64, codeDtype DataType, outDtype DataType, blockSize int64) (*Tensor, error)
QuantizeDequantize: the `quantize_dequantize` operator; delegates to Api.OpQuantizeDequantize. Non-consuming (retain-before-consuming-op).
QuantizeInplaceToDense
func (t *Tensor) QuantizeInplaceToDense(out *Tensor, scale *Tensor, zeroPoint *Tensor, quantAxis int64, blockSize int64) (error)
QuantizeInplaceToDense: the `quantize_inplace_to_dense` operator; delegates to Api.OpQuantizeInplaceToDense. Non-consuming (retain-before-consuming-op).
QuantizeInplaceToQuantized
func (t *Tensor) QuantizeInplaceToQuantized(out *QTensor) (error)
QuantizeInplaceToQuantized: the `quantize_inplace_to_quantized` operator; delegates to Api.OpQuantizeInplaceToQuantized. Non-consuming (retain-before-consuming-op).
QuantizeToScheme
func (t *Tensor) QuantizeToScheme(scheme string, scale *Tensor) (*QTensor, error)
QuantizeToScheme: the `quantize_to_scheme` operator; delegates to Api.OpQuantizeToScheme. Non-consuming (retain-before-consuming-op).
QuickGelu
func (t *Tensor) QuickGelu() (*Tensor, error)
QuickGelu: the `quick_gelu` operator; delegates to Api.OpQuickGelu. Non-consuming (retain-before-consuming-op).
Rad2deg
func (t *Tensor) Rad2deg() (*Tensor, error)
Rad2deg: the `rad2deg` operator; delegates to Api.OpRad2deg. Non-consuming (retain-before-consuming-op).
Rad2deg_
func (t *Tensor) Rad2deg_() (*Tensor, error)
Rad2deg_: the `rad2deg_` operator; delegates to Api.OpRad2degInplace. Returns the receiver so in-place calls chain.
Random_
func (t *Tensor) Random_(lowHas bool, low int64, highHas bool, high int64, s StreamOrDevice) (*Tensor, error)
Random_: the `random_` operator; delegates to Api.OpRandomInplace. Returns the receiver so in-place calls chain.
Reciprocal
func (t *Tensor) Reciprocal() (*Tensor, error)
Reciprocal: the `reciprocal` operator; delegates to Api.OpReciprocal. Non-consuming (retain-before-consuming-op).
Reciprocal_
func (t *Tensor) Reciprocal_() (*Tensor, error)
Reciprocal_: the `reciprocal_` operator; delegates to Api.OpReciprocalInplace. Returns the receiver so in-place calls chain.
ReflectPad
func (t *Tensor) ReflectPad(pad []ScalarOrTensor) (*Tensor, error)
ReflectPad: the `reflect_pad` operator; delegates to Api.OpReflectPad. Non-consuming (retain-before-consuming-op).
Reglu
func (t *Tensor) Reglu() (*Tensor, error)
Reglu: the `reglu` operator; delegates to Api.OpReglu. Non-consuming (retain-before-consuming-op).
Release
func (t *Tensor) Release()
Release drops this handle's reference (the last release frees the storage). Safe on an already-consumed or released tensor.
Relu
func (t *Tensor) Relu() (*Tensor, error)
Relu: the `relu` operator; delegates to Api.OpRelu. Non-consuming (retain-before-consuming-op).
Relu6
func (t *Tensor) Relu6() (*Tensor, error)
Relu6: the `relu6` operator; delegates to Api.OpRelu6. Non-consuming (retain-before-consuming-op).
Relu6_
func (t *Tensor) Relu6_() (*Tensor, error)
Relu6_: the `relu6_` operator; delegates to Api.OpRelu6Inplace. Returns the receiver so in-place calls chain.
Relu_
func (t *Tensor) Relu_() (*Tensor, error)
Relu_: the `relu_` operator; delegates to Api.OpReluInplace. Returns the receiver so in-place calls chain.
Remainder
func (t *Tensor) Remainder(other ScalarOrTensor) (*Tensor, error)
Remainder: the `remainder` operator; delegates to Api.OpRemainder. Non-consuming (retain-before-consuming-op).
Remainder_
func (t *Tensor) Remainder_(other ScalarOrTensor) (*Tensor, error)
Remainder_: the `remainder_` operator; delegates to Api.OpRemainderInplace. Returns the receiver so in-place calls chain.
Renorm
func (t *Tensor) Renorm(p Scalar, dim int64, maxnorm Scalar, epsHas bool, eps float64) (*Tensor, error)
Renorm: the `renorm` operator; delegates to Api.OpRenorm. Non-consuming (retain-before-consuming-op).
Renorm_
func (t *Tensor) Renorm_(p Scalar, dim int64, maxnorm Scalar, epsHas bool, eps float64) (*Tensor, error)
Renorm_: the `renorm_` operator; delegates to Api.OpRenormInplace. Returns the receiver so in-place calls chain.
Repeat
func (t *Tensor) Repeat(sizes []ScalarOrTensor) (*Tensor, error)
Repeat: the `repeat` operator; delegates to Api.OpRepeat. Non-consuming (retain-before-consuming-op).
RepeatInterleave
func (t *Tensor) RepeatInterleave(repeats ScalarOrTensor, dimHas bool, dim int64, outputSizeHas bool, outputSize int64) (*Tensor, error)
RepeatInterleave: the `repeat_interleave` operator; delegates to Api.OpRepeatInterleave. Non-consuming (retain-before-consuming-op).
ReplicatePad
func (t *Tensor) ReplicatePad(pad []ScalarOrTensor) (*Tensor, error)
ReplicatePad: the `replicate_pad` operator; delegates to Api.OpReplicatePad. Non-consuming (retain-before-consuming-op).
Resample
func (t *Tensor) Resample(origFreq int64, newFreq int64, lowpassFilterWidth int64, rolloff float64, betaHas bool, beta float64) (*Tensor, error)
Resample: the `resample` operator; delegates to Api.OpResample. Non-consuming (retain-before-consuming-op).
Reshape
func (t *Tensor) Reshape(shape []IndexBound) (*Tensor, error)
Reshape: the `reshape` operator; delegates to Api.OpReshape. Non-consuming (retain-before-consuming-op).
ReshapeAs
func (t *Tensor) ReshapeAs(other *Tensor) (*Tensor, error)
ReshapeAs: the `reshape_as` operator; delegates to Api.OpReshapeAs. Non-consuming (retain-before-consuming-op).
Retain
func (t *Tensor) Retain() *Tensor
Retain returns a NEW independent handle over the same tensor: the runtime reference count is bumped, so releasing either handle leaves the other valid (the last release frees the storage). This is the caller-side spelling of the retain-before-consuming-op mechanism; use it to hold a tensor past a scope that releases the original.
Rfft
func (t *Tensor) Rfft(nFftHas bool, nFft int64, normalized bool) (*Tensor, error)
Rfft: the `rfft` operator; delegates to Api.OpRfft. Non-consuming (retain-before-consuming-op).
RmsNorm
func (t *Tensor) RmsNorm(normalizedShape []int64, weight *Tensor, bias *Tensor, epsHas bool, eps float64, activationHas bool, activation Activation) (*Tensor, error)
RmsNorm: the `rms_norm` operator; delegates to Api.OpRmsNorm. Non-consuming (retain-before-consuming-op).
Roll
func (t *Tensor) Roll(shifts []int64, dims []int64) (*Tensor, error)
Roll: the `roll` operator; delegates to Api.OpRoll. Non-consuming (retain-before-consuming-op).
Rot90
func (t *Tensor) Rot90(k int64, dims []int64) (*Tensor, error)
Rot90: the `rot90` operator; delegates to Api.OpRot90. Non-consuming (retain-before-consuming-op).
RotaryEmbeddingQk
func (t *Tensor) RotaryEmbeddingQk(k *Tensor, positionIds *Tensor, cos *Tensor, sin *Tensor, freqFactors *Tensor, opts *RotaryEmbeddingQkOptions) (*Tensor, *Tensor, error)
RotaryEmbeddingQk: the `rotary_embedding_qk` operator; delegates to Api.OpRotaryEmbeddingQk. Non-consuming (retain-before-consuming-op).
RotaryEmbeddingQkVarlen
func (t *Tensor) RotaryEmbeddingQkVarlen(k *Tensor, cuSeqlens *Tensor, seqlens *Tensor, positionIds *Tensor, cos *Tensor, sin *Tensor, freqFactors *Tensor, opts *RotaryEmbeddingQkVarlenOptions) (*Tensor, *Tensor, error)
RotaryEmbeddingQkVarlen: the `rotary_embedding_qk_varlen` operator; delegates to Api.OpRotaryEmbeddingQkVarlen. Non-consuming (retain-before-consuming-op).
Round
func (t *Tensor) Round(decimals int64) (*Tensor, error)
Round: the `round` operator; delegates to Api.OpRound. Non-consuming (retain-before-consuming-op).
Round_
func (t *Tensor) Round_(decimals int64) (*Tensor, error)
Round_: the `round_` operator; delegates to Api.OpRoundInplace. Returns the receiver so in-place calls chain.
Rsqrt
func (t *Tensor) Rsqrt() (*Tensor, error)
Rsqrt: the `rsqrt` operator; delegates to Api.OpRsqrt. Non-consuming (retain-before-consuming-op).
Rsqrt_
func (t *Tensor) Rsqrt_() (*Tensor, error)
Rsqrt_: the `rsqrt_` operator; delegates to Api.OpRsqrtInplace. Returns the receiver so in-place calls chain.
ScaledDotProductAttention
func (t *Tensor) ScaledDotProductAttention(k *Tensor, v *Tensor, attnMask *Tensor, isCausal bool, qScale ScalarOrTensor, kScale ScalarOrTensor, vScale ScalarOrTensor) (*Tensor, error)
ScaledDotProductAttention: the `scaled_dot_product_attention` operator; delegates to Api.OpScaledDotProductAttention. Non-consuming (retain-before-consuming-op).
ScaledDotProductAttentionVarlen
func (t *Tensor) ScaledDotProductAttentionVarlen(k *Tensor, v *Tensor, cuSeqlensQ *Tensor, cuSeqlensK *Tensor, maxSeqlenQ ScalarOrTensor, maxSeqlenK ScalarOrTensor, attnMask *Tensor, isCausal bool, qScale ScalarOrTensor, kScale ScalarOrTensor, vScale ScalarOrTensor) (*Tensor, error)
ScaledDotProductAttentionVarlen: the `scaled_dot_product_attention_varlen` operator; delegates to Api.OpScaledDotProductAttentionVarlen. Non-consuming (retain-before-consuming-op).
Scatter
func (t *Tensor) Scatter(dim int64, index *Tensor, src ScalarOrTensor) (*Tensor, error)
Scatter: the `scatter` operator; delegates to Api.OpScatter. Non-consuming (retain-before-consuming-op).
ScatterAdd
func (t *Tensor) ScatterAdd(dim int64, index *Tensor, src *Tensor, deterministic bool) (*Tensor, error)
ScatterAdd: the `scatter_add` operator; delegates to Api.OpScatterAdd. Non-consuming (retain-before-consuming-op).
ScatterAdd_
func (t *Tensor) ScatterAdd_(dim int64, index *Tensor, src *Tensor, deterministic bool) (*Tensor, error)
ScatterAdd_: the `scatter_add_` operator; delegates to Api.OpScatterAddInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
ScatterReduce
func (t *Tensor) ScatterReduce(dim int64, index *Tensor, src *Tensor, reduce ScatterReduceMode, includeSelf bool, deterministic bool) (*Tensor, error)
ScatterReduce: the `scatter_reduce` operator; delegates to Api.OpScatterReduce. Non-consuming (retain-before-consuming-op).
ScatterReduce_
func (t *Tensor) ScatterReduce_(dim int64, index *Tensor, src *Tensor, reduce ScatterReduceMode, includeSelf bool, deterministic bool) (*Tensor, error)
ScatterReduce_: the `scatter_reduce_` operator; delegates to Api.OpScatterReduceInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
Scatter_
func (t *Tensor) Scatter_(dim int64, index *Tensor, src ScalarOrTensor) (*Tensor, error)
Scatter_: the `scatter_` operator; delegates to Api.OpScatterInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
Select
func (t *Tensor) Select(dim int64, index IndexBound) (*Tensor, error)
Select: the `select` operator; delegates to Api.OpSelect. Non-consuming (retain-before-consuming-op).
Selu
func (t *Tensor) Selu() (*Tensor, error)
Selu: the `selu` operator; delegates to Api.OpSelu. Non-consuming (retain-before-consuming-op).
Selu_
func (t *Tensor) Selu_() (*Tensor, error)
Selu_: the `selu_` operator; delegates to Api.OpSeluInplace. Returns the receiver so in-place calls chain.
Sgn
func (t *Tensor) Sgn() (*Tensor, error)
Sgn: the `sgn` operator; delegates to Api.OpSgn. Non-consuming (retain-before-consuming-op).
Sgn_
func (t *Tensor) Sgn_() (*Tensor, error)
Sgn_: the `sgn_` operator; delegates to Api.OpSgnInplace. Returns the receiver so in-place calls chain.
Shape
func (t *Tensor) Shape() []int64
Shape reports the tensor's extents (the recorded bound for a data-dependent producer).
ShapeDim
func (t *Tensor) ShapeDim(dimHas bool, dim int64) (*Tensor, error)
ShapeDim: the `shape_dim` operator; delegates to Api.OpShapeDim. Non-consuming (retain-before-consuming-op).
ShapeHostAll
func (t *Tensor) ShapeHostAll() (*Tensor, error)
ShapeHostAll: the `shape_host_all` operator; delegates to Api.OpShapeHostAll. Non-consuming (retain-before-consuming-op).
ShapeHostDim
func (t *Tensor) ShapeHostDim(dim int64) (*Tensor, error)
ShapeHostDim: the `shape_host_dim` operator; delegates to Api.OpShapeHostDim. Non-consuming (retain-before-consuming-op).
ShapeHostRange
func (t *Tensor) ShapeHostRange(startHas bool, start int64, endHas bool, end int64) (*Tensor, error)
ShapeHostRange: the `shape_host_range` operator; delegates to Api.OpShapeHostRange. Non-consuming (retain-before-consuming-op).
ShapeRange
func (t *Tensor) ShapeRange(startHas bool, start int64, endHas bool, end int64) (*Tensor, error)
ShapeRange: the `shape_range` operator; delegates to Api.OpShapeRange. Non-consuming (retain-before-consuming-op).
Sigmoid
func (t *Tensor) Sigmoid() (*Tensor, error)
Sigmoid: the `sigmoid` operator; delegates to Api.OpSigmoid. Non-consuming (retain-before-consuming-op).
Sigmoid_
func (t *Tensor) Sigmoid_() (*Tensor, error)
Sigmoid_: the `sigmoid_` operator; delegates to Api.OpSigmoidInplace. Returns the receiver so in-place calls chain.
Sign
func (t *Tensor) Sign() (*Tensor, error)
Sign: the `sign` operator; delegates to Api.OpSign. Non-consuming (retain-before-consuming-op).
Sign_
func (t *Tensor) Sign_() (*Tensor, error)
Sign_: the `sign_` operator; delegates to Api.OpSignInplace. Returns the receiver so in-place calls chain.
Silu
func (t *Tensor) Silu() (*Tensor, error)
Silu: the `silu` operator; delegates to Api.OpSilu. Non-consuming (retain-before-consuming-op).
Silu_
func (t *Tensor) Silu_() (*Tensor, error)
Silu_: the `silu_` operator; delegates to Api.OpSiluInplace. Returns the receiver so in-place calls chain.
Sin
func (t *Tensor) Sin() (*Tensor, error)
Sin: the `sin` operator; delegates to Api.OpSin. Non-consuming (retain-before-consuming-op).
Sin_
func (t *Tensor) Sin_() (*Tensor, error)
Sin_: the `sin_` operator; delegates to Api.OpSinInplace. Returns the receiver so in-place calls chain.
Sinc
func (t *Tensor) Sinc() (*Tensor, error)
Sinc: the `sinc` operator; delegates to Api.OpSinc. Non-consuming (retain-before-consuming-op).
Sinc_
func (t *Tensor) Sinc_() (*Tensor, error)
Sinc_: the `sinc_` operator; delegates to Api.OpSincInplace. Returns the receiver so in-place calls chain.
Sinh
func (t *Tensor) Sinh() (*Tensor, error)
Sinh: the `sinh` operator; delegates to Api.OpSinh. Non-consuming (retain-before-consuming-op).
Sinh_
func (t *Tensor) Sinh_() (*Tensor, error)
Sinh_: the `sinh_` operator; delegates to Api.OpSinhInplace. Returns the receiver so in-place calls chain.
SliceDim
func (t *Tensor) SliceDim(dim int64, start IndexBound, end IndexBound, step IndexBound) (*Tensor, error)
SliceDim: the `slice_dim` operator; delegates to Api.OpSliceDim. Non-consuming (retain-before-consuming-op).
SliceDims
func (t *Tensor) SliceDims(dim []int64, start []IndexBound, end []IndexBound, step []IndexBound) (*Tensor, error)
SliceDims: the `slice_dims` operator; delegates to Api.OpSliceDims. Non-consuming (retain-before-consuming-op).
SmoothL1Loss
func (t *Tensor) SmoothL1Loss(target *Tensor, reduction Reduction, beta float64) (*Tensor, error)
SmoothL1Loss: the `smooth_l1_loss` operator; delegates to Api.OpSmoothL1Loss. Non-consuming (retain-before-consuming-op).
Snake
func (t *Tensor) Snake(alpha *Tensor, beta *Tensor, eps float64) (*Tensor, error)
Snake: the `snake` operator; delegates to Api.OpSnake. Non-consuming (retain-before-consuming-op).
Snake_
func (t *Tensor) Snake_(alpha *Tensor, beta *Tensor, eps float64) (*Tensor, error)
Snake_: the `snake_` operator; delegates to Api.OpSnakeInplace. Non-consuming (retain-before-consuming-op). Returns the receiver so in-place calls chain.
SoftcapLogits
func (t *Tensor) SoftcapLogits(cap ScalarOrTensor) (*Tensor, error)
SoftcapLogits: the `softcap_logits` operator; delegates to Api.OpSoftcapLogits. Non-consuming (retain-before-consuming-op).
SoftcapLogits_
func (t *Tensor) SoftcapLogits_(cap ScalarOrTensor) (*Tensor, error)
SoftcapLogits_: the `softcap_logits_` operator; delegates to Api.OpSoftcapLogitsInplace. Returns the receiver so in-place calls chain.
Softmax
func (t *Tensor) Softmax(dim int64, dtype DataType) (*Tensor, error)
Softmax: the `softmax` operator; delegates to Api.OpSoftmax. Non-consuming (retain-before-consuming-op).
Softmax_
func (t *Tensor) Softmax_(dim int64) (*Tensor, error)
Softmax_: the `softmax_` operator; delegates to Api.OpSoftmaxInplace. Returns the receiver so in-place calls chain.
Softmin
func (t *Tensor) Softmin(dim int64, dtype DataType) (*Tensor, error)
Softmin: the `softmin` operator; delegates to Api.OpSoftmin. Non-consuming (retain-before-consuming-op).
Softmin_
func (t *Tensor) Softmin_(dim int64) (*Tensor, error)
Softmin_: the `softmin_` operator; delegates to Api.OpSoftminInplace. Returns the receiver so in-place calls chain.
Softplus
func (t *Tensor) Softplus(beta float64, threshold float64) (*Tensor, error)
Softplus: the `softplus` operator; delegates to Api.OpSoftplus. Non-consuming (retain-before-consuming-op).
Softplus_
func (t *Tensor) Softplus_(beta float64, threshold float64) (*Tensor, error)
Softplus_: the `softplus_` operator; delegates to Api.OpSoftplusInplace. Returns the receiver so in-place calls chain.
Softshrink
func (t *Tensor) Softshrink(lambd float64) (*Tensor, error)
Softshrink: the `softshrink` operator; delegates to Api.OpSoftshrink. Non-consuming (retain-before-consuming-op).
Softshrink_
func (t *Tensor) Softshrink_(lambd float64) (*Tensor, error)
Softshrink_: the `softshrink_` operator; delegates to Api.OpSoftshrinkInplace. Returns the receiver so in-place calls chain.
Softsign
func (t *Tensor) Softsign() (*Tensor, error)
Softsign: the `softsign` operator; delegates to Api.OpSoftsign. Non-consuming (retain-before-consuming-op).
Softsign_
func (t *Tensor) Softsign_() (*Tensor, error)
Softsign_: the `softsign_` operator; delegates to Api.OpSoftsignInplace. Returns the receiver so in-place calls chain.
Sort
func (t *Tensor) Sort(dim int64, descending bool, stable bool) (*Tensor, *Tensor, error)
Sort: the `sort` operator; delegates to Api.OpSort. Non-consuming (retain-before-consuming-op).
SplitBySize
func (t *Tensor) SplitBySize(chunkSize int64, dim int64) (*TensorList, error)
SplitBySize: the `split_by_size` operator; delegates to Api.OpSplitBySize. Non-consuming (retain-before-consuming-op).
SplitWithSizes
func (t *Tensor) SplitWithSizes(sizes []ScalarOrTensor, dim int64) (*TensorList, error)
SplitWithSizes: the `split_with_sizes` operator; delegates to Api.OpSplitWithSizes. Non-consuming (retain-before-consuming-op).
Sqrt
func (t *Tensor) Sqrt() (*Tensor, error)
Sqrt: the `sqrt` operator; delegates to Api.OpSqrt. Non-consuming (retain-before-consuming-op).
Sqrt_
func (t *Tensor) Sqrt_() (*Tensor, error)
Sqrt_: the `sqrt_` operator; delegates to Api.OpSqrtInplace. Returns the receiver so in-place calls chain.
Square
func (t *Tensor) Square() (*Tensor, error)
Square: the `square` operator; delegates to Api.OpSquare. Non-consuming (retain-before-consuming-op).
Square_
func (t *Tensor) Square_() (*Tensor, error)
Square_: the `square_` operator; delegates to Api.OpSquareInplace. Returns the receiver so in-place calls chain.
Squeeze
func (t *Tensor) Squeeze(dim []int64) (*Tensor, error)
Squeeze: the `squeeze` operator; delegates to Api.OpSqueeze. Non-consuming (retain-before-consuming-op).
Squeeze_
func (t *Tensor) Squeeze_(dim []int64) (*Tensor, error)
Squeeze_: the `squeeze_` operator; delegates to Api.OpSqueezeInplace. Returns the receiver so in-place calls chain.
SsdUpdate
func (t *Tensor) SsdUpdate(dt *Tensor, aRate *Tensor, bMat *Tensor, cMat *Tensor, dSkip *Tensor, dtBias *Tensor, z *Tensor, state *Tensor, seqLens *Tensor, slotIds *Tensor, dtSoftplus bool) (*Tensor, error)
SsdUpdate: the `ssd_update` operator; delegates to Api.OpSsdUpdate. Non-consuming (retain-before-consuming-op).
Std
func (t *Tensor) Std(dims []int64, correction int64, keepdim bool) (*Tensor, error)
Std: the `std` operator; delegates to Api.OpStd. Non-consuming (retain-before-consuming-op).
Stft
func (t *Tensor) Stft(nFft int64, window *Tensor, opts *StftOptions) (*Tensor, error)
Stft: the `stft` operator; delegates to Api.OpStft. Non-consuming (retain-before-consuming-op).
String
func (t *Tensor) String() string
String implements fmt.Stringer over Summary; a read failure renders as an error marker rather than failing the format call.
SubTensor
func (t *Tensor) SubTensor(other ScalarOrTensor, alpha float64, activation Activation) (*Tensor, error)
SubTensor: the `sub_tensor` operator; delegates to Api.OpSubTensor. Non-consuming (retain-before-consuming-op).
Sub_
func (t *Tensor) Sub_(other ScalarOrTensor, alpha float64, activation Activation) (*Tensor, error)
Sub_: the `sub_` operator; delegates to Api.OpSubInplace. Returns the receiver so in-place calls chain.
Sum
func (t *Tensor) Sum(dims []int64, keepdim bool, dtype DataType) (*Tensor, error)
Sum: the `sum` operator; delegates to Api.OpSum. Non-consuming (retain-before-consuming-op).
Summary
func (t *Tensor) Summary() (string, error)
Summary reads the tensor's human-readable summary (shape, dtype, first values).
Swiglu
func (t *Tensor) Swiglu(alpha float64, beta float64, limit float64) (*Tensor, error)
Swiglu: the `swiglu` operator; delegates to Api.OpSwiglu. Non-consuming (retain-before-consuming-op).
Take
func (t *Tensor) Take(index *Tensor) (*Tensor, error)
Take: the `take` operator; delegates to Api.OpTake. Non-consuming (retain-before-consuming-op).
TakeAlongDim
func (t *Tensor) TakeAlongDim(index *Tensor, dimHas bool, dim int64) (*Tensor, error)
TakeAlongDim: the `take_along_dim` operator; delegates to Api.OpTakeAlongDim. Non-consuming (retain-before-consuming-op).
Tan
func (t *Tensor) Tan() (*Tensor, error)
Tan: the `tan` operator; delegates to Api.OpTan. Non-consuming (retain-before-consuming-op).
Tan_
func (t *Tensor) Tan_() (*Tensor, error)
Tan_: the `tan_` operator; delegates to Api.OpTanInplace. Returns the receiver so in-place calls chain.
Tanh
func (t *Tensor) Tanh() (*Tensor, error)
Tanh: the `tanh` operator; delegates to Api.OpTanh. Non-consuming (retain-before-consuming-op).
Tanh_
func (t *Tensor) Tanh_() (*Tensor, error)
Tanh_: the `tanh_` operator; delegates to Api.OpTanhInplace. Returns the receiver so in-place calls chain.
Tensordot
func (t *Tensor) Tensordot(b *Tensor, dimsA []int64, dimsB []int64) (*Tensor, error)
Tensordot: the `tensordot` operator; delegates to Api.OpTensordot. Non-consuming (retain-before-consuming-op).
Threshold
func (t *Tensor) Threshold(threshold float64, value float64) (*Tensor, error)
Threshold: the `threshold` operator; delegates to Api.OpThreshold. Non-consuming (retain-before-consuming-op).
Threshold_
func (t *Tensor) Threshold_(threshold float64, value float64) (*Tensor, error)
Threshold_: the `threshold_` operator; delegates to Api.OpThresholdInplace. Returns the receiver so in-place calls chain.
Tile
func (t *Tensor) Tile(dims []ScalarOrTensor) (*Tensor, error)
Tile: the `tile` operator; delegates to Api.OpTile. Non-consuming (retain-before-consuming-op).
Topk
func (t *Tensor) Topk(k int64, dim int64, largest bool, sorted bool) (*Tensor, *Tensor, error)
Topk: the `topk` operator; delegates to Api.OpTopk. Non-consuming (retain-before-consuming-op).
Trace
func (t *Tensor) Trace() (*Tensor, error)
Trace: the `trace` operator; delegates to Api.OpTrace. Non-consuming (retain-before-consuming-op).
Transpose
func (t *Tensor) Transpose(dim0 int64, dim1 int64) (*Tensor, error)
Transpose: the `transpose` operator; delegates to Api.OpTranspose. Non-consuming (retain-before-consuming-op).
Tril
func (t *Tensor) Tril(diagonal int64) (*Tensor, error)
Tril: the `tril` operator; delegates to Api.OpTril. Non-consuming (retain-before-consuming-op).
Tril_
func (t *Tensor) Tril_(diagonal int64) (*Tensor, error)
Tril_: the `tril_` operator; delegates to Api.OpTrilInplace. Returns the receiver so in-place calls chain.
Triu
func (t *Tensor) Triu(diagonal int64) (*Tensor, error)
Triu: the `triu` operator; delegates to Api.OpTriu. Non-consuming (retain-before-consuming-op).
Triu_
func (t *Tensor) Triu_(diagonal int64) (*Tensor, error)
Triu_: the `triu_` operator; delegates to Api.OpTriuInplace. Returns the receiver so in-place calls chain.
Trunc
func (t *Tensor) Trunc() (*Tensor, error)
Trunc: the `trunc` operator; delegates to Api.OpTrunc. Non-consuming (retain-before-consuming-op).
Trunc_
func (t *Tensor) Trunc_() (*Tensor, error)
Trunc_: the `trunc_` operator; delegates to Api.OpTruncInplace. Returns the receiver so in-place calls chain.
Unflatten
func (t *Tensor) Unflatten(dim int64, sizes []int64) (*Tensor, error)
Unflatten: the `unflatten` operator; delegates to Api.OpUnflatten. Non-consuming (retain-before-consuming-op).
Unfold
func (t *Tensor) Unfold(kernelSize []int64, dilation []int64, padding []int64, stride []int64, mode PadMode, valueHas bool, value float64) (*Tensor, error)
Unfold: the `unfold` operator; delegates to Api.OpUnfold. Non-consuming (retain-before-consuming-op).
Uniform_
func (t *Tensor) Uniform_(low float64, high float64, s StreamOrDevice) (*Tensor, error)
Uniform_: the `uniform_` operator; delegates to Api.OpUniformInplace. Returns the receiver so in-place calls chain.
Unique
func (t *Tensor) Unique(sorted bool, returnInverse bool, returnCounts bool, dimHas bool, dim int64) (*Tensor, *Tensor, *Tensor, error)
Unique: the `unique` operator; delegates to Api.OpUnique. Non-consuming (retain-before-consuming-op).
UniqueConsecutive
func (t *Tensor) UniqueConsecutive(returnInverse bool, returnCounts bool, dimHas bool, dim int64) (*Tensor, *Tensor, *Tensor, error)
UniqueConsecutive: the `unique_consecutive` operator; delegates to Api.OpUniqueConsecutive. Non-consuming (retain-before-consuming-op).
Unsqueeze
func (t *Tensor) Unsqueeze(dim int64) (*Tensor, error)
Unsqueeze: the `unsqueeze` operator; delegates to Api.OpUnsqueeze. Non-consuming (retain-before-consuming-op).
Unsqueeze_
func (t *Tensor) Unsqueeze_(dim int64) (*Tensor, error)
Unsqueeze_: the `unsqueeze_` operator; delegates to Api.OpUnsqueezeInplace. Returns the receiver so in-place calls chain.
UpsampleBicubic2d
func (t *Tensor) UpsampleBicubic2d(sizes []ScalarOrTensor, scaleFactors []ScalarOrTensor, alignCorners bool) (*Tensor, error)
UpsampleBicubic2d: the `upsample_bicubic2d` operator; delegates to Api.OpUpsampleBicubic2d. Non-consuming (retain-before-consuming-op).
UpsampleBilinear2d
func (t *Tensor) UpsampleBilinear2d(sizes []ScalarOrTensor, scaleFactors []ScalarOrTensor, alignCorners bool) (*Tensor, error)
UpsampleBilinear2d: the `upsample_bilinear2d` operator; delegates to Api.OpUpsampleBilinear2d. Non-consuming (retain-before-consuming-op).
UpsampleLinear1d
func (t *Tensor) UpsampleLinear1d(sizes []ScalarOrTensor, scaleFactors []ScalarOrTensor, alignCorners bool) (*Tensor, error)
UpsampleLinear1d: the `upsample_linear1d` operator; delegates to Api.OpUpsampleLinear1d. Non-consuming (retain-before-consuming-op).
UpsampleNearest1d
func (t *Tensor) UpsampleNearest1d(sizes []ScalarOrTensor, scaleFactors []ScalarOrTensor) (*Tensor, error)
UpsampleNearest1d: the `upsample_nearest1d` operator; delegates to Api.OpUpsampleNearest1d. Non-consuming (retain-before-consuming-op).
UpsampleNearest2d
func (t *Tensor) UpsampleNearest2d(sizes []ScalarOrTensor, scaleFactors []ScalarOrTensor) (*Tensor, error)
UpsampleNearest2d: the `upsample_nearest2d` operator; delegates to Api.OpUpsampleNearest2d. Non-consuming (retain-before-consuming-op).
UpsampleNearest3d
func (t *Tensor) UpsampleNearest3d(sizes []ScalarOrTensor, scaleFactors []ScalarOrTensor) (*Tensor, error)
UpsampleNearest3d: the `upsample_nearest3d` operator; delegates to Api.OpUpsampleNearest3d. Non-consuming (retain-before-consuming-op).
UpsampleTrilinear3d
func (t *Tensor) UpsampleTrilinear3d(sizes []ScalarOrTensor, scaleFactors []ScalarOrTensor, alignCorners bool) (*Tensor, error)
UpsampleTrilinear3d: the `upsample_trilinear3d` operator; delegates to Api.OpUpsampleTrilinear3d. Non-consuming (retain-before-consuming-op).
Var
func (t *Tensor) Var(dims []int64, correction int64, keepdim bool) (*Tensor, error)
Var: the `var` operator; delegates to Api.OpVar. Non-consuming (retain-before-consuming-op).
Xlog1py
func (t *Tensor) Xlog1py(other ScalarOrTensor) (*Tensor, error)
Xlog1py: the `xlog1py` operator; delegates to Api.OpXlog1py. Non-consuming (retain-before-consuming-op).
Xlogy
func (t *Tensor) Xlogy(other ScalarOrTensor) (*Tensor, error)
Xlogy: the `xlogy` operator; delegates to Api.OpXlogy. Non-consuming (retain-before-consuming-op).
Xlogy_
func (t *Tensor) Xlogy_(other ScalarOrTensor) (*Tensor, error)
Xlogy_: the `xlogy_` operator; delegates to Api.OpXlogyInplace. Returns the receiver so in-place calls chain.
Zero_
func (t *Tensor) Zero_(s StreamOrDevice) (*Tensor, error)
Zero_: the `zero_` operator; delegates to Api.OpZeroInplace. Returns the receiver so in-place calls chain.