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
- NoGrad
Guard - A RAII guard that prevents gradient tracking until deallocated.
- Scalar
- A single scalar value.
- Tensor
- A tensor object.
- TrainableC
Module - 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.
- Tensor
Indexer
Traits§
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.