Crate tch

Source

Modules§

data
Dataset iterators.
display
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.
utils
vision
The vision module groups functions and models related to computer vision.

Structs§

CModule
A jit PyTorch module.
COptimizer
NewAxis
NoGradGuard
A RAII guard that prevents gradient tracking until deallocated.
Scalar
A single scalar value.
Tensor
A tensor object.
TrainableCModule
The trainable version of a jit PyTorch module.

Enums§

Cuda
Cuda related helper functions.
Device
A torch device.
IValue
Argument and output values for JIT models. These represent arbitrary values, e.g. tensors, atomic values, pairs of values, etc.
Kind
The different kind of elements that a Tensor can hold.
Layout
A tensor layout.
QEngine
Quantization engines
Reduction
TchError
Main library error type.
TensorIndexer

Traits§

IndexOp
Shape

Functions§

autocast
Runs a closure in mixed precision.
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. Note that it is important to bind this to a name like _guard and not to _ as the latter would immediately drop the guard. See https://internals.rust-lang.org/t/pre-rfc-must-bind/12658/46 for more details.
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.
with_grad
Runs a closure explicitly keeping track of gradients, this could be run within a no_grad closure for example.

Type Aliases§

Result