[][src]Crate tch

Modules

data

Dataset iterators.

index

Indexing operations

jit

JIT interface to run model trained/saved using PyTorch Python API.

kind

The different kind of elements supported in Torch.

nn

A small neural-network library based on Torch.

vision

The vision module groups functions and models related to computer vision.

Structs

CModule

A jit PyTorch module.

NewAxis
NoGradGuard

A RAII guard that prevents gradient tracking until deallocated.

Scalar

A single scalar value.

Tensor

A tensor object.

Enums

Cuda

Cuda related helper functions.

Device

A torch device.

IValue

Argument and output values for JIT models.

Kind

The different kind of elements that a Tensor can hold.

Reduction
TchError

Main library error type.

TensorIndexer

Traits

IndexOp
Shape

Functions

get_num_interop_threads

Get the number of threads used by torch for inter-op parallelism.

get_num_threads

Get the number of threads used by torch in parallel regions.

manual_seed

Sets the random seed used by torch.

no_grad

Runs a closure without keeping track of gradients.

no_grad_guard

Disables gradient tracking, this will be enabled back when the returned value gets deallocated.

set_num_interop_threads

Set the number of threads used by torch for inter-op parallelism.

set_num_threads

Set the number of threads used by torch in parallel regions.