Utility ops

Unreleased native NuTorch shell reference. Generated by scripts/gen-ops-reference.ts; every op also documents itself with torch <op> --help. Tensor operands are native values, not strings.

manual_seed

seed the random number generator

Signature (placeholders describe arguments; this is not a runnable example):

use torch
torch manual_seed <seed>

Tips

Intro

manual_seed makes the next random draw repeatable.

use torch
torch manual_seed 1
torch ones [1]

Basic

Seed, then sum a vector of ones.

use torch
torch manual_seed 1
torch ones [2] | torch sum | torch value

Intermediate

Seed, then sum the absolute values.

use torch
torch manual_seed 2
torch ones [2] | torch abs | torch sum | torch value

Advanced

Seed, negate, abs, sum, and read.

use torch
torch manual_seed 3
torch ones [2] | torch neg | torch abs | torch sum | torch value