vtl #
The V Tensor Library
[![Mentioned in Awesome V][awesomevbadge]][awesomevurl] [![CI][workflowbadge]][workflowurl] [![Docs][docsbadge]][docsurl] [![Full ML][fullmlbadge]][fullmlurl] [![Benchmarks][benchmarksbadge]][benchmarksurl] [![License: MIT][licensebadge]][licenseurl] ![VSL Backed][vslbackedbadge] ![CUDA Optional][cudaoptionalbadge] ![Vulkan f32][vulkanbadge]
VTL is a pure-V tensor library for numerical computing and machine learning — n-dimensional arrays, autograd, linear algebra via VSL, and a full neural network module.
Train small neural networks, experiment with autograd, and use VSL-backed CPU, CUDA, and Vulkan compute paths from one V-native API.
vlang.io | Docs | Tutorials | ML Roadmap | Contributing | VSL
import vtl
t := vtl.from_array([1.0, 2, 3, 4], [2, 2])!
t.get([1, 1])
// 4.0
Features
- Tensors — create, slice, reshape, transpose, broadcast, map/reduce
- Autograd — reverse-mode AD; arbitrary computational graphs
- Neural networks —
SequentialAPI; Linear, Conv2D, LSTM, Attention, … - Losses & optimizers — MSE, BCE, CrossEntropy, Huber; Adam, AdamW, SGD, …
- Linear algebra — VSL-backed matmul, solve, QR, LU, Cholesky, SVD, pinv
- Hardware — zero-copy
Tensor.datafor C libs; optional CUDA and Vulkan training paths
ML Release Highlights
The ML beta scope is the high-level VTL API: tensors, autograd, layers, losses, optimizers, datasets, and CPU training. CUDA and Vulkan paths are available for opt-in validation and early adopters, but remain experimental backend accelerators rather than stable user contracts.
| Area | Status |
|---|---|
| f32 training | Sequential + MSE + Adam smoke tests |
| CUDA | Experimental opt-in Linear/Conv2D forward, CUDA backward, activation chain, Adam slots |
| Vulkan | Experimental opt-in f32 Linear, Conv2D same-padding, ReLU/Sigmoid, fused Adam shader |
| Datasets | MNIST, IMDB, CIFAR-10 loaders plus CI-safe synthetic examples |
| Benchmarks | VTL vs NumPy/PyTorch scripts and PR benchmark workflow |
For memory-safe local commands, see DEV_LIGHTWEIGHT.md.
Quick start
import vtl
import vtl.autograd
import vtl.nn.layers
import vtl.nn.models
import vtl.nn.optimizers
mut ctx := autograd.ctx[f32]()
mut model := models.sequential_from_ctx[f32](ctx)
model.input([784])
model.linear(256)
model.linear(10)
model.mse_loss()
input_tensor := vtl.zeros[f32]([64, 784])
mut x := ctx.variable(input_tensor)
y_pred := model.forward(x)!
target := vtl.zeros[f32]([64, 10])
mut loss_val := model.loss(y_pred, target)!
loss_val.backprop()!
mut opt := optimizers.adam_optimizer[f32](optimizers.AdamOptimizerConfig{
learning_rate: 0.001
})
opt.build_params(model.info.layers)
opt.update()!
Module overview
| Module | Purpose |
|---|---|
vtl |
Core Tensor[T]; creation, slicing, broadcasting |
vtl.autograd |
Context, Variable, gates, backprop() |
vtl.la |
Linear algebra (wraps VSL) |
vtl.nn |
Layers, losses, optimizers |
vtl.nn.models |
Sequential model API |
vtl.nn.internal |
Weight init (Kaiming, Xavier) |
vtl.nn.gates |
Autograd gate implementations |
Installation
VTL uses VSL for linear algebra. The core vtl module works without optional system BLAS/LAPACK, but LA features need VSL.
Follow VSL install instructions, then:
v install vtl
Testing
v test ~/.vmodules/vtl
See DEV_LIGHTWEIGHT.md for memory-safe subsets in CI.
Documentation
Start Here
| Goal | Read |
|---|---|
| Learn tensors | First steps |
| Learn autograd | Autograd tutorial |
| Build neural networks | Neural networks |
| Pick optimizers | Optimizers |
| Run examples | Examples catalog |
| Use datasets | Datasets |
| Use GPU paths safely | DEV_LIGHTWEIGHT.md, DEVICE_MEMORY.md |
| Tutorial | Topic |
|---|---|
| TUTORIAL_FIRST_STEPS.md | Tensor creation, indexing, slicing |
| TUTORIAL_MAP_REDUCE.md | map / nmap and reductions |
| TUTORIAL_AUTOGRAD.md | Variable, gates, backprop |
| TUTORIAL_REDUCTIONS.md | argmax / argmin / cumsum |
| TUTORIAL_NEURAL_NETWORKS.md | Layers, losses, Sequential |
| TUTORIAL_OPTIMIZERS.md | Adam, AdamW, RMSProp, schedulers |
| TUTORIAL_LINEAR_ALGEBRA.md | LA basics via VSL |
| TUTORIAL_ADVANCED_LA.md | QR, LU, Cholesky, pinv |
| TUTORIAL_BROADCASTING.md | Broadcasting rules |
| TUTORIAL_SLICING.md | Slicing and views |
Full index: docs/README.md.
Contributors
Originally based on work by
christopherzimmerman.
The core was reimplemented while keeping that lineage and inspiration.
Made with contributors-img.
License
[awesomevbadge]: https://awesome.re/mentioned-badge.svg [workflowbadge]: https://github.com/vlang/vtl/actions/workflows/ci.yml/badge.svg [docsbadge]: https://github.com/vlang/vtl/actions/workflows/deploy-docs.yml/badge.svg [fullmlbadge]: https://github.com/vlang/vtl/actions/workflows/ci-full-ml.yml/badge.svg [benchmarksbadge]: https://github.com/vlang/vtl/actions/workflows/benchmark-pr-comment.yml/badge.svg [licensebadge]: https://img.shields.io/badge/License-MIT-blue.svg [vslbackedbadge]: https://img.shields.io/badge/VSL-backed-027d9c?logo=v [cudaoptionalbadge]: https://img.shields.io/badge/CUDA-optional-76b900?logo=nvidia [vulkanbadge]: https://img.shields.io/badge/Vulkan-f32-ac162c?logo=vulkan [awesomevurl]: https://github.com/vlang/awesome-v/blob/master/README.md#scientific-computing [workflowurl]: https://github.com/vlang/vtl/actions/workflows/ci.yml [docsurl]: https://github.com/vlang/vtl/actions/workflows/deploy-docs.yml [fullmlurl]: https://github.com/vlang/vtl/actions/workflows/ci-full-ml.yml [benchmarksurl]: https://github.com/vlang/vtl/actions/workflows/benchmark-pr-comment.yml [licenseurl]: https://github.com/vlang/vtl/blob/main/LICENSE
fn bernoulli #
fn bernoulli[T](prob f64, shape []int, params TensorData) &Tensor[T]
bernoulli returns a tensor of bernoulli random variables.
fn binomial #
fn binomial[T](n int, prob f64, shape []int, params TensorData) !&Tensor[T]
binomial returns a tensor of binomial random variables.
fn broadcast2 #
fn broadcast2[T](a &Tensor[T], b &Tensor[T]) !(&Tensor[T], &Tensor[T])
broadcast2 exposes this operation as part of the public API.
fn broadcast3 #
fn broadcast3[T](a &Tensor[T], b &Tensor[T], c &Tensor[T]) !(&Tensor[T], &Tensor[T], &Tensor[T])
broadcast3 exposes this operation as part of the public API.
fn broadcast_n #
fn broadcast_n[T](ts []&Tensor[T]) ![]&Tensor[T]
broadcast_n exposes this operation as part of the public API.
fn cast #
fn cast[T](x TensorDataType) T
cast exposes this operation as part of the public API.
fn column_stack #
fn column_stack[T](ts []&Tensor[T]) !&Tensor[T]
column_stack stacks 1-D arrays as columns into a 2-D array.
fn concatenate #
fn concatenate[T](ts []&Tensor[T], data AxisData) !&Tensor[T]
concatenate concatenates two Tensors together
fn dstack #
fn dstack[T](ts []&Tensor[T]) !&Tensor[T]
dstack stacks arrays in sequence depth wise (along third axis)
fn empty #
fn empty[T](shape []int, params TensorData) &Tensor[T]
fn empty_like #
fn empty_like[T](t &Tensor[T]) &Tensor[T]
empty_like exposes this operation as part of the public API.
fn exponential #
fn exponential[T](lambda f64, shape []int, params TensorData) &Tensor[T]
exponential returns a tensor of exponential random variables.
fn eye #
fn eye[T](m int, n int, k int, params TensorData) &Tensor[T]
eye returns a 2D array with ones on the diagonal and zeros elsewhere
fn from_1d #
fn from_1d[T](arr []T, params TensorData) !&Tensor[T]
from_1d takes a one dimensional array of floating point values and returns a one dimensional Tensor if possible
fn from_2d #
fn from_2d[T](a [][]T, params TensorData) !&Tensor[T]
from_2d exposes this operation as part of the public API.
fn from_array #
fn from_array[T](arr []T, shape []int, params TensorData) !&Tensor[T]
from_varray takes a one dimensional array of T values and coerces it into an arbitrary shaped Tensor if possible. Panics if the shape provided does not hold the provided array
fn full #
fn full[T](shape []int, val T, params TensorData) &Tensor[T]
full exposes this operation as part of the public API.
fn full_like #
fn full_like[T](t &Tensor[T], val T) &Tensor[T]
full_like returns a new tensor of the same shape and type as a given Tensor filled with a given val
fn hstack #
fn hstack[T](ts []&Tensor[T]) !&Tensor[T]
hstack stacks arrays in sequence horizontally (column wise)
fn identity #
fn identity[T](n int, params TensorData) &Tensor[T]
identity exposes this operation as part of the public API.
fn normal #
fn normal[T](shape []int, params NormalTensorData) &Tensor[T]
normal returns a tensor of normal random variables.
fn ones #
fn ones[T](shape []int, params TensorData) &Tensor[T]
ones exposes this operation as part of the public API.
fn ones_like #
fn ones_like[T](t &Tensor[T]) &Tensor[T]
ones_like exposes this operation as part of the public API.
fn random #
fn random[T](min T, max T, shape []int, params TensorData) &Tensor[T]
random returns a new Tensor of given shape and type, initialized with random numbers between a given min and max value
fn random_seed #
fn random_seed(i int)
random_seed exposes this operation as part of the public API.
fn range #
fn range[T](from int, to int, params TensorData) &Tensor[T]
range returns a Tensor containing values ranging from [from, to)
fn seq #
fn seq[T](n int, params TensorData) &Tensor[T]
seq exposes this operation as part of the public API.
fn stack #
fn stack[T](ts []&Tensor[T], data AxisData) !&Tensor[T]
stack join a sequence of arrays along a new axis.
fn td #
fn td[T](x T) TensorDataType
td exposes this operation as part of the public API.
fn tensor #
fn tensor[T](init T, shape []int, params TensorData) &Tensor[T]
tensor allocates a Tensor onto specified device with a given data
fn tensor_like #
fn tensor_like[T](t &Tensor[T]) &Tensor[T]
tensor_like returns a new tensor created with similar storage properties as the Tensor t
fn tensor_like_with_shape #
fn tensor_like_with_shape[T](t &Tensor[T], shape []int) &Tensor[T]
tensor_like_with_shape returns a new tensor created with similar storage properties as the Tensor t with a given shape
fn vstack #
fn vstack[T](ts []&Tensor[T]) !&Tensor[T]
vstack stack arrays in sequence vertically (row wise)
fn zeros #
fn zeros[T](shape []int, params TensorData) &Tensor[T]
zeros exposes this operation as part of the public API.
fn zeros_like #
fn zeros_like[T](t &Tensor[T]) &Tensor[T]
zeros_like exposes this operation as part of the public API.
fn IteratorStrategy.from #
fn IteratorStrategy.from[W](input W) !IteratorStrategy
fn MemoryFormat.from #
fn MemoryFormat.from[W](input W) !MemoryFormat
interface AnyTensor #
interface AnyTensor[T] {
shape []int
strides []int
cpu() &Tensor[T]
vcl() !&Tensor[T]
str() string
rank() int
size() int
is_matrix() bool
is_square_matrix() bool
is_vector() bool
is_row_major() bool
is_col_major() bool
is_row_major_contiguous() bool
is_col_major_contiguous() bool
is_contiguous() bool
mut:
memory MemoryFormat
}
AnyTensor is an interface that allows for any tensor to be used in the vtl library
fn (TensorAxisIterator[T]) next #
fn (mut s TensorAxisIterator[T]) next[T]() ?(T, []int)
next exposes this operation as part of the public API.
type TensorDataType #
type TensorDataType = bool | f32 | f64 | i16 | i64 | i8 | int | string | u16 | u32 | u64 | u8
TensorDataType is a sum type that lists the possible types to be used to define storage
fn (TensorDataType) string #
fn (v TensorDataType) string() string
string returns TensorDataType as a string.
fn (TensorDataType) int #
fn (v TensorDataType) int() int
int uses TensorDataType as an integer.
fn (TensorDataType) i64 #
fn (v TensorDataType) i64() i64
i64 uses TensorDataType as a 64-bit integer.
fn (TensorDataType) i8 #
fn (v TensorDataType) i8() i8
i8 uses TensorDataType as a 8-bit unsigned integer.
fn (TensorDataType) i16 #
fn (v TensorDataType) i16() i16
i16 uses TensorDataType as a 16-bit unsigned integer.
fn (TensorDataType) u8 #
fn (v TensorDataType) u8() u8
u8 uses TensorDataType as a 8-bit unsigned integer.
fn (TensorDataType) u16 #
fn (v TensorDataType) u16() u16
u16 uses TensorDataType as a 16-bit unsigned integer.
fn (TensorDataType) u32 #
fn (v TensorDataType) u32() u32
u32 uses TensorDataType as a 32-bit unsigned integer.
fn (TensorDataType) u64 #
fn (v TensorDataType) u64() u64
u64 uses TensorDataType as a 64-bit unsigned integer.
fn (TensorDataType) f32 #
fn (v TensorDataType) f32() f32
f32 uses TensorDataType as a 32-bit float.
fn (TensorDataType) f64 #
fn (v TensorDataType) f64() f64
f64 uses TensorDataType as a float.
fn (TensorDataType) bool #
fn (v TensorDataType) bool() bool
bool uses TensorDataType as a bool
fn (TensorIterator[T]) next #
fn (mut s TensorIterator[T]) next[T]() ?(T, []int)
next exposes this operation as part of the public API.
fn (Tensor[T]) abs #
fn (t &Tensor[T]) abs[T]() &Tensor[T]
abs exposes this operation as part of the public API.
fn (Tensor[T]) acos #
fn (t &Tensor[T]) acos[T]() &Tensor[T]
acos exposes this operation as part of the public API.
fn (Tensor[T]) acosh #
fn (t &Tensor[T]) acosh[T]() &Tensor[T]
acosh exposes this operation as part of the public API.
fn (Tensor[T]) add #
fn (a &Tensor[T]) add[T](b &Tensor[T]) !&Tensor[T]
fn (Tensor[T]) add_scalar #
fn (a &Tensor[T]) add_scalar[T](scalar T) !&Tensor[T]
add_scalar exposes this operation as part of the public API.
fn (Tensor[T]) alike #
fn (t &Tensor[T]) alike[T](other &Tensor[T]) !&Tensor[bool]
alike exposes this operation as part of the public API.
fn (Tensor[T]) all #
fn (t &Tensor[T]) all[T]() bool
all returns whether all array elements evaluate to true.
fn (Tensor[T]) any #
fn (t &Tensor[T]) any[T]() bool
any returns whether any array elements evaluate to true.
fn (Tensor[T]) apply #
fn (mut t Tensor[T]) apply[T](f fn (x T, i []int) T)
apply applies a function to each element of a given Tensor
fn (Tensor[T]) argmax #
fn (t &Tensor[T]) argmax[T](axis int) !&Tensor[int]
argmax exposes this operation as part of the public API.
fn (Tensor[T]) argmax_axis #
fn (t &Tensor[T]) argmax_axis[T](axis int) !&Tensor[int]
fn (Tensor[T]) argmin #
fn (t &Tensor[T]) argmin[T](axis int) !&Tensor[int]
argmin exposes this operation as part of the public API.
fn (Tensor[T]) argmin_axis #
fn (t &Tensor[T]) argmin_axis[T](axis int) !&Tensor[int]
argmin_axis exposes this operation as part of the public API.
fn (Tensor[T]) array_equal #
fn (t &Tensor[T]) array_equal[T](other &Tensor[T]) bool
array_equal returns true if input arrays have the same shape and all elements equal.
fn (Tensor[T]) array_equiv #
fn (t &Tensor[T]) array_equiv[T](other &Tensor[T]) bool
array_equiv returns true if input arrays are shape consistent and all elements equal. Shape consistent means they are either the same shape, or one input array can be broadcasted to create the same shape as the other one.
fn (Tensor[T]) array_split #
fn (t &Tensor[T]) array_split[T](ind int, axis int) ![]&Tensor[T]
fn (Tensor[T]) array_split_expl #
fn (t &Tensor[T]) array_split_expl[T](ind []int, axis int) ![]&Tensor[T]
array_split_expl splits an array into multiple sub-arrays. Please refer to the split documentation. The only difference between these functions is that array_split allows indices_or_sections to be an integer that does not equally divide the axis. For an array of length l that should be split into n sections, it returns l % n sub-arrays of size l//n + 1 and the rest of size l//n.
fn (Tensor[T]) as_bool #
fn (t &Tensor[T]) as_bool[T]() &Tensor[bool]
fn (Tensor[T]) as_f32 #
fn (t &Tensor[T]) as_f32[T]() &Tensor[f32]
as_f32 exposes this operation as part of the public API.
fn (Tensor[T]) as_f64 #
fn (t &Tensor[T]) as_f64[T]() &Tensor[f64]
as_f64 exposes this operation as part of the public API.
fn (Tensor[T]) as_i16 #
fn (t &Tensor[T]) as_i16[T]() &Tensor[i16]
as_i16 exposes this operation as part of the public API.
fn (Tensor[T]) as_i8 #
fn (t &Tensor[T]) as_i8[T]() &Tensor[i8]
as_i8 exposes this operation as part of the public API.
fn (Tensor[T]) as_int #
fn (t &Tensor[T]) as_int[T]() &Tensor[int]
as_int exposes this operation as part of the public API.
fn (Tensor[T]) as_strided #
fn (t &Tensor[T]) as_strided[T](shape []int, strides []int) !&Tensor[T]
as_strided returns a view of the Tensor with new shape and strides
fn (Tensor[T]) as_string #
fn (t &Tensor[T]) as_string[T]() &Tensor[string]
as_string exposes this operation as part of the public API.
fn (Tensor[T]) as_u8 #
fn (t &Tensor[T]) as_u8[T]() &Tensor[u8]
as_u8 exposes this operation as part of the public API.
fn (Tensor[T]) asin #
fn (t &Tensor[T]) asin[T]() &Tensor[T]
asin exposes this operation as part of the public API.
fn (Tensor[T]) asinh #
fn (t &Tensor[T]) asinh[T]() &Tensor[T]
asinh exposes this operation as part of the public API.
fn (Tensor[T]) assert_matrix #
fn (t &Tensor[T]) assert_matrix[T]() !
assert_matrix exposes this operation as part of the public API.
fn (Tensor[T]) assert_square_matrix #
fn (t &Tensor[T]) assert_square_matrix[T]() !
assert_square_matrix exposes this operation as part of the public API.
fn (Tensor[T]) assign #
fn (mut t Tensor[T]) assign[T](other &Tensor[T]) !&Tensor[T]
assign sets the values of an Tensor equal to the values of another Tensor of the same shape
fn (Tensor[T]) atan #
fn (t &Tensor[T]) atan[T]() &Tensor[T]
atan exposes this operation as part of the public API.
fn (Tensor[T]) atan2 #
fn (a &Tensor[T]) atan2[T](b &Tensor[T]) !&Tensor[T]
atan2 exposes this operation as part of the public API.
fn (Tensor[T]) atanh #
fn (t &Tensor[T]) atanh[T]() &Tensor[T]
atanh exposes this operation as part of the public API.
fn (Tensor[T]) axis_iterator #
fn (t &Tensor[T]) axis_iterator[T](axis int) &TensorAxisIterator[T]
axis_iterator returns an iterator over the axis of a Tensor, commonly used for reduction operations along an axis.
fn (Tensor[T]) axis_with_dims_iterator #
fn (t &Tensor[T]) axis_with_dims_iterator[T](axis int) &TensorAxisIterator[T]
axis returns an iterator over the axis of a Tensor, commonly used for reduction operations along an axis. This iterator keeps the axis dimension as size 1 instead of removing it
fn (Tensor[T]) broadcast_to #
fn (t &Tensor[T]) broadcast_to[T](shape []int) !&Tensor[T]
broadcast_to broadcasts a Tensor to a compatible shape with no data copy
fn (Tensor[T]) broadcastable #
fn (a &Tensor[T]) broadcastable[T](b &Tensor[T]) ![]int
broadcastable takes two Tensors and either returns a valid broadcastable shape or an error
fn (Tensor[T]) cbrt #
fn (t &Tensor[T]) cbrt[T]() &Tensor[T]
cbrt exposes this operation as part of the public API.
fn (Tensor[T]) ceil #
fn (t &Tensor[T]) ceil[T]() &Tensor[T]
ceil exposes this operation as part of the public API.
fn (Tensor[T]) close #
fn (t &Tensor[T]) close[T](other &Tensor[T]) !&Tensor[bool]
close exposes this operation as part of the public API.
fn (Tensor[T]) copy #
fn (t &Tensor[T]) copy(memory MemoryFormat) &Tensor[T]
copy exposes this operation as part of the public API.
fn (Tensor[T]) cos #
fn (t &Tensor[T]) cos[T]() &Tensor[T]
cos exposes this operation as part of the public API.
fn (Tensor[T]) cosh #
fn (t &Tensor[T]) cosh[T]() &Tensor[T]
cosh exposes this operation as part of the public API.
fn (Tensor[T]) cot #
fn (t &Tensor[T]) cot[T]() &Tensor[T]
cot exposes this operation as part of the public API.
fn (Tensor[T]) cpu #
fn (t &Tensor[T]) cpu() !&Tensor[T]
cpu exposes this operation as part of the public API.
fn (Tensor[T]) cuda #
fn (t &Tensor[T]) cuda(params CudaParams) !&Tensor[T]
cuda returns an error when CUDA is not enabled at compile time
fn (Tensor[T]) cumprod #
fn (t &Tensor[T]) cumprod[T](axis int) !&Tensor[T]
cumprod exposes this operation as part of the public API.
fn (Tensor[T]) cumsum #
fn (t &Tensor[T]) cumsum[T](axis int) !&Tensor[T]
cumsum exposes this operation as part of the public API.
fn (Tensor[T]) custom_iterator #
fn (t &Tensor[T]) custom_iterator[T](data IteratorBuildData[T]) &TensorIterator[T]
iterator creates an iterator through a Tensor with custom data
fn (Tensor[T]) degrees #
fn (t &Tensor[T]) degrees[T]() &Tensor[T]
degrees exposes this operation as part of the public API.
fn (Tensor[T]) diag #
fn (t &Tensor[T]) diag[T]() !&Tensor[T]
diag constructs a diagonal array. input must be one dimensional and will be placed along the resulting diagonal
fn (Tensor[T]) diag_flat #
fn (t &Tensor[T]) diag_flat[T]() !&Tensor[T]
diag_flat constructs a diagonal array. the flattened input is placed along the diagonal of the resulting matrix
fn (Tensor[T]) diagonal #
fn (t &Tensor[T]) diagonal[T]() &Tensor[T]
diagonal returns a view of the diagonal entries of a two dimensional tensor
fn (Tensor[T]) divide #
fn (a &Tensor[T]) divide[T](b &Tensor[T]) !&Tensor[T]
divide exposes this operation as part of the public API.
fn (Tensor[T]) divide_scalar #
fn (a &Tensor[T]) divide_scalar[T](scalar T) !&Tensor[T]
divide_scalar exposes this operation as part of the public API.
fn (Tensor[T]) dsplit #
fn (t &Tensor[T]) dsplit[T](ind int) ![]&Tensor[T]
dsplit splits array into multiple sub-arrays along the 3rd axis (depth). Please refer to the split documentation. dsplit is equivalent to split with axis=2, the array is always split along the third axis provided the array dimension is greater than or equal to 3.
fn (Tensor[T]) dsplit_expl #
fn (t &Tensor[T]) dsplit_expl[T](ind []int) ![]&Tensor[T]
dsplit_expl splits array into multiple sub-arrays along the 3rd axis (depth). Please refer to the split documentation. dsplit is equivalent to split with axis=2, the array is always split along the third axis provided the array dimension is greater than or equal to 3.
fn (Tensor[T]) ensure_memory #
fn (mut t Tensor[T]) ensure_memory[T]()
ensure_memory exposes this operation as part of the public API.
fn (Tensor[T]) equal #
fn (t &Tensor[T]) equal[T](other &Tensor[T]) !&Tensor[bool]
equal exposes this operation as part of the public API.
fn (Tensor[T]) erf #
fn (t &Tensor[T]) erf[T]() &Tensor[T]
erf exposes this operation as part of the public API.
fn (Tensor[T]) erfc #
fn (t &Tensor[T]) erfc[T]() &Tensor[T]
erfc exposes this operation as part of the public API.
fn (Tensor[T]) exp #
fn (t &Tensor[T]) exp[T]() &Tensor[T]
exp exposes this operation as part of the public API.
fn (Tensor[T]) exp2 #
fn (t &Tensor[T]) exp2[T]() &Tensor[T]
exp2 exposes this operation as part of the public API.
fn (Tensor[T]) expand_dims #
fn (t &Tensor[T]) expand_dims[T](data AxisData) !&Tensor[T]
expand_dims adds an axis to a Tensor in order to support broadcasting operations
fn (Tensor[T]) expm1 #
fn (t &Tensor[T]) expm1[T]() &Tensor[T]
expm1 exposes this operation as part of the public API.
fn (Tensor[T]) f32_bits #
fn (t &Tensor[T]) f32_bits[T]() &Tensor[T]
f32_bits exposes this operation as part of the public API.
fn (Tensor[T]) f32_from_bits #
fn (t &Tensor[T]) f32_from_bits[T]() &Tensor[T]
f32_from_bits exposes this operation as part of the public API.
fn (Tensor[T]) f64_bits #
fn (t &Tensor[T]) f64_bits[T]() &Tensor[T]
f64_bits exposes this operation as part of the public API.
fn (Tensor[T]) f64_from_bits #
fn (t &Tensor[T]) f64_from_bits[T]() &Tensor[T]
f64_from_bits exposes this operation as part of the public API.
fn (Tensor[T]) factorial #
fn (t &Tensor[T]) factorial[T]() &Tensor[T]
factorial exposes this operation as part of the public API.
fn (Tensor[T]) fill #
fn (mut t Tensor[T]) fill[T](val T) &Tensor[T]
fill exposes this operation as part of the public API.
fn (Tensor[T]) floor #
fn (t &Tensor[T]) floor[T]() &Tensor[T]
floor exposes this operation as part of the public API.
fn (Tensor[T]) fmod #
fn (a &Tensor[T]) fmod[T](b &Tensor[T]) !&Tensor[T]
fmod exposes this operation as part of the public API.
fn (Tensor[T]) gamma #
fn (t &Tensor[T]) gamma[T]() &Tensor[T]
gamma exposes this operation as part of the public API.
fn (Tensor[T]) gcd #
fn (a &Tensor[T]) gcd[T](b &Tensor[T]) !&Tensor[T]
gcd exposes this operation as part of the public API.
fn (Tensor[T]) get #
fn (t &Tensor[T]) get[T](index []int) T
fn (Tensor[T]) get_nth #
fn (t &Tensor[T]) get_nth[T](n int) T
get_nth exposes this operation as part of the public API.
fn (Tensor[T]) hsplit #
fn (t &Tensor[T]) hsplit[T](ind int) ![]&Tensor[T]
hsplit splits an array into multiple sub-arrays horizontally (column-wise). Please refer to the split documentation. hsplit is equivalent to split with axis=1, the array is always split along the second axis regardless of the array dimension.
fn (Tensor[T]) hsplit_expl #
fn (t &Tensor[T]) hsplit_expl[T](ind []int) ![]&Tensor[T]
hsplit_expl splits an array into multiple sub-arrays horizontally (column-wise) Please refer to the split documentation. hsplit is equivalent to split with axis=1, the array is always split along the second axis regardless of the array dimension.
fn (Tensor[T]) hypot #
fn (a &Tensor[T]) hypot[T](b &Tensor[T]) !&Tensor[T]
hypot exposes this operation as part of the public API.
fn (Tensor[T]) is_col_major #
fn (t &Tensor[T]) is_col_major() bool
is_col_major exposes this operation as part of the public API.
fn (Tensor[T]) is_col_major_contiguous #
fn (t &Tensor[T]) is_col_major_contiguous() bool
is_col_major_contiguous exposes this operation as part of the public API.
fn (Tensor[T]) is_contiguous #
fn (t &Tensor[T]) is_contiguous() bool
is_contiguous exposes this operation as part of the public API.
fn (Tensor[T]) is_finite #
fn (t &Tensor[T]) is_finite[T]() &Tensor[bool]
is_finite returns true where x is not positive infinity, negative infinity, or NaN; false otherwise.
fn (Tensor[T]) is_inf #
fn (t &Tensor[T]) is_inf[T](sign int) &Tensor[bool]
is_inf reports whether t is an infinity, according to sign. If sign > 0, is_inf reports whether t is positive infinity. If sign < 0, is_inf reports whether t is negative infinity. If sign == 0, is_inf reports whether t is either infinity.
fn (Tensor[T]) is_matrix #
fn (t &Tensor[T]) is_matrix() bool
is_matrix exposes this operation as part of the public API.
fn (Tensor[T]) is_nan #
fn (t &Tensor[T]) is_nan[T]() &Tensor[bool]
is_nan reports whether f is an IEEE 754 ``not-a-number'' value.
fn (Tensor[T]) is_row_major #
fn (t &Tensor[T]) is_row_major() bool
is_row_major exposes this operation as part of the public API.
fn (Tensor[T]) is_row_major_contiguous #
fn (t &Tensor[T]) is_row_major_contiguous() bool
is_row_major_contiguous exposes this operation as part of the public API.
fn (Tensor[T]) is_square_matrix #
fn (t &Tensor[T]) is_square_matrix() bool
is_square_matrix exposes this operation as part of the public API.
fn (Tensor[T]) is_vector #
fn (t &Tensor[T]) is_vector() bool
is_vector exposes this operation as part of the public API.
fn (Tensor[T]) iterator #
fn (t &Tensor[T]) iterator[T]() &TensorIterator[T]
iterator creates an iterator through a Tensor
fn (Tensor[T]) iterators #
fn (t &Tensor[T]) iterators[T](ts []&Tensor[T]) !(&TensorsIterator[T], []int)
iterators creates an array of iterators through a list of tensors
fn (Tensor[T]) lcm #
fn (a &Tensor[T]) lcm[T](b &Tensor[T]) !&Tensor[T]
lcm exposes this operation as part of the public API.
fn (Tensor[T]) log #
fn (t &Tensor[T]) log[T]() &Tensor[T]
log exposes this operation as part of the public API.
fn (Tensor[T]) log10 #
fn (t &Tensor[T]) log10[T]() &Tensor[T]
log10 exposes this operation as part of the public API.
fn (Tensor[T]) log1p #
fn (t &Tensor[T]) log1p[T]() &Tensor[T]
log1p exposes this operation as part of the public API.
fn (Tensor[T]) log2 #
fn (t &Tensor[T]) log2[T]() &Tensor[T]
log2 exposes this operation as part of the public API.
fn (Tensor[T]) log_factorial #
fn (t &Tensor[T]) log_factorial[T]() &Tensor[T]
log_factorial exposes this operation as part of the public API.
fn (Tensor[T]) log_gamma #
fn (t &Tensor[T]) log_gamma[T]() &Tensor[T]
log_gamma exposes this operation as part of the public API.
fn (Tensor[T]) log_n #
fn (a &Tensor[T]) log_n[T](b &Tensor[T]) !&Tensor[T]
log_n exposes this operation as part of the public API.
fn (Tensor[T]) map #
fn (t &Tensor[T]) map[T](f fn (x T, i []int) T) &Tensor[T]
map maps a function to a given Tensor retuning a new Tensor with same shape
fn (Tensor[T]) max #
fn (a &Tensor[T]) max[T](b &Tensor[T]) !&Tensor[T]
max exposes this operation as part of the public API.
fn (Tensor[T]) max_axis #
fn (t &Tensor[T]) max_axis[T](axis int) !&Tensor[T]
max_axis exposes this operation as part of the public API.
fn (Tensor[T]) min #
fn (a &Tensor[T]) min[T](b &Tensor[T]) !&Tensor[T]
min exposes this operation as part of the public API.
fn (Tensor[T]) min_axis #
fn (t &Tensor[T]) min_axis[T](axis int) !&Tensor[T]
min_axis exposes this operation as part of the public API.
fn (Tensor[T]) multiply #
fn (a &Tensor[T]) multiply[T](b &Tensor[T]) !&Tensor[T]
multiply exposes this operation as part of the public API.
fn (Tensor[T]) multiply_scalar #
fn (a &Tensor[T]) multiply_scalar[T](scalar T) !&Tensor[T]
multiply_scalar exposes this operation as part of the public API.
fn (Tensor[T]) napply #
fn (mut t Tensor[T]) napply[T](ts []&Tensor[T], f fn (xs []T, i []int) T) !
napply applies a function to each element of a given Tensor with params
fn (Tensor[T]) nextafter #
fn (a &Tensor[T]) nextafter[T](b &Tensor[T]) !&Tensor[T]
nextafter exposes this operation as part of the public API.
fn (Tensor[T]) nextafter32 #
fn (a &Tensor[T]) nextafter32[T](b &Tensor[T]) !&Tensor[T]
nextafter32 exposes this operation as part of the public API.
fn (Tensor[T]) nmap #
fn (t &Tensor[T]) nmap[T](ts []&Tensor[T], f fn (xs []T, i []int) T) !&Tensor[T]
nmap maps a function to a given list of Tensor retuning a new Tensor with same shape
fn (Tensor[T]) not_equal #
fn (t &Tensor[T]) not_equal[T](other &Tensor[T]) !&Tensor[bool]
not_equal exposes this operation as part of the public API.
fn (Tensor[T]) nreduce #
fn (t &Tensor[T]) nreduce[T](ts []&Tensor[T], init T, f fn (acc T, xs []T, i []int) T) !T
nreduce reduces a function to a given list of Tensor retuning a new aggregated value
fn (Tensor[T]) nth_index #
fn (t &Tensor[T]) nth_index[T](n int) []int
nth_index returns the nth index of a Tensor's shape for n == 2 and a shape of [2, 2] the nth index is [1, 0] and for a shape of [2, 3] and n == 3 the nth index is [0, 1, 1] in sorted order.
fn (Tensor[T]) offset_index #
fn (t &Tensor[T]) offset_index[T](index []int) int
offset_index exposes this operation as part of the public API.
fn (Tensor[T]) pow #
fn (a &Tensor[T]) pow[T](b &Tensor[T]) !&Tensor[T]
pow exposes this operation as part of the public API.
fn (Tensor[T]) pow10 #
fn (t &Tensor[T]) pow10[T]() &Tensor[T]
pow10 exposes this operation as part of the public API.
fn (Tensor[T]) radians #
fn (t &Tensor[T]) radians[T]() &Tensor[T]
radians exposes this operation as part of the public API.
fn (Tensor[T]) rank #
fn (t &Tensor[T]) rank() int
rank returns the number of dimensions of a given Tensor
fn (Tensor[T]) ravel #
fn (t &Tensor[T]) ravel[T]() !&Tensor[T]
ravel exposes this operation as part of the public API.
fn (Tensor[T]) reduce #
fn (t &Tensor[T]) reduce[T](init T, f fn (acc T, x T, i []int) T) T
reduce reduces a function to a given Tensor retuning a new aggregated value
fn (Tensor[T]) reshape #
fn (t &Tensor[T]) reshape[T](shape []int) !&Tensor[T]
reshape returns an Tensor with a new shape
fn (Tensor[T]) round #
fn (t &Tensor[T]) round[T]() &Tensor[T]
round exposes this operation as part of the public API.
fn (Tensor[T]) round_to_even #
fn (t &Tensor[T]) round_to_even[T]() &Tensor[T]
round_to_even exposes this operation as part of the public API.
fn (Tensor[T]) set #
fn (mut t Tensor[T]) set[T](index []int, val T)
fn (Tensor[T]) set_nth #
fn (mut t Tensor[T]) set_nth[T](n int, val T)
set_nth exposes this operation as part of the public API.
fn (Tensor[T]) sin #
fn (t &Tensor[T]) sin[T]() &Tensor[T]
sin exposes this operation as part of the public API.
fn (Tensor[T]) sinh #
fn (t &Tensor[T]) sinh[T]() &Tensor[T]
sinh exposes this operation as part of the public API.
fn (Tensor[T]) size #
fn (t &Tensor[T]) size() int
size returns the number of allocated elements for a given tensor
fn (Tensor[T]) slice #
fn (t &Tensor[T]) slice[T](idx ...[]int) !&Tensor[T]
slice exposes this operation as part of the public API.
fn (Tensor[T]) slice_hilo #
fn (t &Tensor[T]) slice_hilo[T](idx1 []int, idx2 []int) !&Tensor[T]
slice_hilo exposes this operation as part of the public API.
fn (Tensor[T]) split #
fn (t &Tensor[T]) split[T](ind int, axis int) ![]&Tensor[T]
split splits an array into multiple sub-arrays. The array will be divided into N equal arrays along axis. If such a split is not possible, panic
fn (Tensor[T]) split_expl #
fn (t &Tensor[T]) split_expl[T](ind []int, axis int) ![]&Tensor[T]
split_expl splits an array into multiple sub-arrays. The array will be divided into The entries of ind indicate where along axis the array is split. For example, [2, 3] would, for axis=0, result in: ary[:2] ary[2:3] ary[3:]
fn (Tensor[T]) sqrt #
fn (t &Tensor[T]) sqrt[T]() &Tensor[T]
sqrt exposes this operation as part of the public API.
fn (Tensor[T]) squeeze #
fn (t &Tensor[T]) squeeze[T](data AxisData) !&Tensor[T]
squeeze removes dimensions of size one from a Tensor. If dim is provided, only that dimension is removed (must be size 1). If no dim is provided, all size-1 dimensions are removed.
fn (Tensor[T]) str #
fn (t &Tensor[T]) str() string
str exposes this operation as part of the public API.
fn (Tensor[T]) subtract #
fn (a &Tensor[T]) subtract[T](b &Tensor[T]) !&Tensor[T]
subtract exposes this operation as part of the public API.
fn (Tensor[T]) subtract_scalar #
fn (a &Tensor[T]) subtract_scalar[T](scalar T) !&Tensor[T]
subtract_scalar exposes this operation as part of the public API.
fn (Tensor[T]) swapaxes #
fn (t &Tensor[T]) swapaxes[T](a1 int, a2 int) !&Tensor[T]
swapaxes returns a view of an tensor with two axes swapped
fn (Tensor[T]) t #
fn (t &Tensor[T]) t[T]() !&Tensor[T]
t returns a full transpose of a tensor, with the axes reversed
fn (Tensor[T]) tan #
fn (t &Tensor[T]) tan[T]() &Tensor[T]
tan exposes this operation as part of the public API.
fn (Tensor[T]) tanh #
fn (t &Tensor[T]) tanh[T]() &Tensor[T]
tanh exposes this operation as part of the public API.
fn (Tensor[T]) to_array #
fn (t &Tensor[T]) to_array() []T
to_array returns the flatten representation of a tensor in a v array storing elements of type T
fn (Tensor[T]) tolerance #
fn (t &Tensor[T]) tolerance[T](other &Tensor[T], tol T) !&Tensor[bool]
tolerance exposes this operation as part of the public API.
fn (Tensor[T]) transpose #
fn (t &Tensor[T]) transpose[T](order []int) !&Tensor[T]
transpose exposes this operation as part of the public API.
fn (Tensor[T]) tril #
fn (t &Tensor[T]) tril[T]() &Tensor[T]
tril computes the lower triangle of an array. returns a copy of an array with elements above the diagonal zeroed
fn (Tensor[T]) tril_inpl_offset #
fn (mut t Tensor[T]) tril_inpl_offset[T](offset int) &Tensor[T]
tril_inpl_offset computes the lower triangle of an array. modifies an array inplace with elements above the k-th diagonal zeroed.
fn (Tensor[T]) tril_inplace #
fn (mut t Tensor[T]) tril_inplace[T]() &Tensor[T]
tril_inplace computes the lower triangle of an array. modifies an array inplace with elements above the diagonal zeroed.
fn (Tensor[T]) tril_offset #
fn (t &Tensor[T]) tril_offset[T](offset int) &Tensor[T]
tril_inplace computes the lower triangle of an array. returns a copy of an array with elements above the kth diagonal zeroed
fn (Tensor[T]) triu #
fn (t &Tensor[T]) triu[T]() &Tensor[T]
triu computes the Upper triangle of an array. returns a copy of an array with elements below the diagonal zeroed
fn (Tensor[T]) triu_inplace #
fn (mut t Tensor[T]) triu_inplace[T]() &Tensor[T]
triu_inplace computes the upper triangle of an array. modifies an array inplace with elements below the diagonal zeroed.
fn (Tensor[T]) triu_offset #
fn (t &Tensor[T]) triu_offset[T](offset int) &Tensor[T]
triu_offset computes the upper triangle of an array. returns a copy of an array with elements below the kth diagonal zeroed
fn (Tensor[T]) trunc #
fn (t &Tensor[T]) trunc[T]() &Tensor[T]
trunc exposes this operation as part of the public API.
fn (Tensor[T]) unsqueeze #
fn (t &Tensor[T]) unsqueeze[T](data AxisData) !&Tensor[T]
unsqueeze adds a dimension of size one to a Tensor
fn (Tensor[T]) vcl #
fn (t &Tensor[T]) vcl(params VclParams) !&Tensor[T]
vcl returns a VclTensor from a Tensor
fn (Tensor[T]) veryclose #
fn (t &Tensor[T]) veryclose[T](other &Tensor[T]) !&Tensor[bool]
veryclose exposes this operation as part of the public API.
fn (Tensor[T]) view #
fn (t &Tensor[T]) view() &Tensor[T]
view exposes this operation as part of the public API.
fn (Tensor[T]) vsplit #
fn (t &Tensor[T]) vsplit[T](ind int) ![]&Tensor[T]
vsplit splits an array into multiple sub-arrays vertically (row-wise). Please refer to the split documentation. vsplit is equivalent to split with axis=0 (default), the array is always split along the first axis regardless of the array dimension.
fn (Tensor[T]) vsplit_expl #
fn (t &Tensor[T]) vsplit_expl[T](ind []int) ![]&Tensor[T]
vsplit_expl splits an array into multiple sub-arrays vertically (row-wise). Please refer to the split documentation. vsplit is equivalent to split with axis=0 (default), the array is always split along the first axis regardless of the array dimension.
fn (Tensor[T]) vulkan #
fn (t &Tensor[T]) vulkan(params storage.VulkanParams) !&Tensor[T]
vulkan exposes this operation as part of the public API.
fn (Tensor[T]) with_broadcast #
fn (t &Tensor[T]) with_broadcast[T](n int) !&Tensor[T]
with_broadcast expands a Tensors dimensions n times by broadcasting the shape and strides
fn (Tensor[T]) with_dims #
fn (t &Tensor[T]) with_dims[T](n int) !&Tensor[T]
with_dims returns a new Tensor adding dimensions so that it has at least n dimensions
fn (TensorsIterator[T]) next #
fn (mut its TensorsIterator[T]) next[T]() ?([]T, []int)
next exposes this operation as part of the public API.
enum IteratorStrategy #
enum IteratorStrategy {
flatten_iteration
strided_iteration
}
IteratorStrategy defines a function to use in order to mutate iteration position
enum MemoryFormat #
enum MemoryFormat {
row_major
col_major
}
MemoryFormat is a sum type that lists the possible memory layouts
struct AxisData #
struct AxisData {
pub:
axis int
}
struct CudaParams #
struct CudaParams {}
CudaParams defines a public data structure for this module.
struct IteratorBuildData #
struct IteratorBuildData[T] {
next_handler IteratorStrategy
start int
}
IteratorBuildData defines a public data structure for this module.
struct NormalTensorData #
struct NormalTensorData {
TensorData
config.NormalConfigStruct
}
NormalTensorData defines a public data structure for this module.
struct Tensor #
struct Tensor[T] {
pub mut:
data &storage.CpuStorage[T] = unsafe { nil }
memory MemoryFormat
size int
shape []int
strides []int
}
Tensor defines a public data structure for this module.
struct TensorAxisIterator #
struct TensorAxisIterator[T] {
pub:
tensor &Tensor[T] = unsafe { nil }
pub mut:
shape []int
strides []int
axis int
inc int
iteration int
pos int
}
struct TensorData #
struct TensorData {
pub:
memory MemoryFormat = .row_major
}
TensorData defines a public data structure for this module.
struct TensorIterator #
struct TensorIterator[T] {
pub:
tensor &Tensor[T] = unsafe { nil }
next_handler IteratorStrategy
pub mut:
iteration int
}
TensorIterator defines a public data structure for this module.
struct TensorsIterator #
struct TensorsIterator[T] {
mut:
iters []&TensorIterator[T]
}
TensorsIterator defines a public data structure for this module.
struct VclParams #
struct VclParams {}
- README
- fn bernoulli
- fn binomial
- fn broadcast2
- fn broadcast3
- fn broadcast_n
- fn cast
- fn column_stack
- fn concatenate
- fn dstack
- fn empty
- fn empty_like
- fn exponential
- fn eye
- fn from_1d
- fn from_2d
- fn from_array
- fn full
- fn full_like
- fn hstack
- fn identity
- fn normal
- fn ones
- fn ones_like
- fn random
- fn random_seed
- fn range
- fn seq
- fn stack
- fn td
- fn tensor
- fn tensor_like
- fn tensor_like_with_shape
- fn vstack
- fn zeros
- fn zeros_like
- fn IteratorStrategy.from
- fn MemoryFormat.from
- interface AnyTensor
- type TensorAxisIterator[T]
- type TensorDataType
- type TensorIterator[T]
- type Tensor[T]
- fn abs
- fn acos
- fn acosh
- fn add
- fn add_scalar
- fn alike
- fn all
- fn any
- fn apply
- fn argmax
- fn argmax_axis
- fn argmin
- fn argmin_axis
- fn array_equal
- fn array_equiv
- fn array_split
- fn array_split_expl
- fn as_bool
- fn as_f32
- fn as_f64
- fn as_i16
- fn as_i8
- fn as_int
- fn as_strided
- fn as_string
- fn as_u8
- fn asin
- fn asinh
- fn assert_matrix
- fn assert_square_matrix
- fn assign
- fn atan
- fn atan2
- fn atanh
- fn axis_iterator
- fn axis_with_dims_iterator
- fn broadcast_to
- fn broadcastable
- fn cbrt
- fn ceil
- fn close
- fn copy
- fn cos
- fn cosh
- fn cot
- fn cpu
- fn cuda
- fn cumprod
- fn cumsum
- fn custom_iterator
- fn degrees
- fn diag
- fn diag_flat
- fn diagonal
- fn divide
- fn divide_scalar
- fn dsplit
- fn dsplit_expl
- fn ensure_memory
- fn equal
- fn erf
- fn erfc
- fn exp
- fn exp2
- fn expand_dims
- fn expm1
- fn f32_bits
- fn f32_from_bits
- fn f64_bits
- fn f64_from_bits
- fn factorial
- fn fill
- fn floor
- fn fmod
- fn gamma
- fn gcd
- fn get
- fn get_nth
- fn hsplit
- fn hsplit_expl
- fn hypot
- fn is_col_major
- fn is_col_major_contiguous
- fn is_contiguous
- fn is_finite
- fn is_inf
- fn is_matrix
- fn is_nan
- fn is_row_major
- fn is_row_major_contiguous
- fn is_square_matrix
- fn is_vector
- fn iterator
- fn iterators
- fn lcm
- fn log
- fn log10
- fn log1p
- fn log2
- fn log_factorial
- fn log_gamma
- fn log_n
- fn map
- fn max
- fn max_axis
- fn min
- fn min_axis
- fn multiply
- fn multiply_scalar
- fn napply
- fn nextafter
- fn nextafter32
- fn nmap
- fn not_equal
- fn nreduce
- fn nth_index
- fn offset_index
- fn pow
- fn pow10
- fn radians
- fn rank
- fn ravel
- fn reduce
- fn reshape
- fn round
- fn round_to_even
- fn set
- fn set_nth
- fn sin
- fn sinh
- fn size
- fn slice
- fn slice_hilo
- fn split
- fn split_expl
- fn sqrt
- fn squeeze
- fn str
- fn subtract
- fn subtract_scalar
- fn swapaxes
- fn t
- fn tan
- fn tanh
- fn to_array
- fn tolerance
- fn transpose
- fn tril
- fn tril_inpl_offset
- fn tril_inplace
- fn tril_offset
- fn triu
- fn triu_inplace
- fn triu_offset
- fn trunc
- fn unsqueeze
- fn vcl
- fn veryclose
- fn view
- fn vsplit
- fn vsplit_expl
- fn vulkan
- fn with_broadcast
- fn with_dims
- type TensorsIterator[T]
- enum IteratorStrategy
- enum MemoryFormat
- struct AxisData
- struct CudaParams
- struct IteratorBuildData
- struct NormalTensorData
- struct Tensor
- struct TensorAxisIterator
- struct TensorData
- struct TensorIterator
- struct TensorsIterator
- struct VclParams