VTL getting started

Install

You need a working V installation. VTL depends on VSL, which v install resolves automatically.

v install vtl
v ~/.vmodules/vtl/examples/vtl_basic_usage/main.v

Your first tensor

Tensors are generic over their element type, keep NumPy-style shapes, and share storage for view operations whenever the layout allows it.

import vtl

fn main() {
    a := vtl.from_array([1.0, 2, 3, 4, 5, 6], [2, 3])!
    b := a.reshape([3, 2])!
    println(b.get([2, 1])) // 6.0
}

Keep going with the first steps and broadcasting tutorials.


Train something small

The repository ships runnable training smokes that need no datasets or GPU. Build them in prod mode for realistic speed.

# build first, then execute — the pattern used by all VTL benchmarks
v -prod -o /tmp/tiny examples/nn_cifar10_tiny_synth/main.v
/tmp/tiny

Then read the autograd tutorial and browse the API reference for layers, losses and optimizers.