Shortcuts

TensorSpec System

TensorSpec classes define the shape, dtype, and domain of tensors in TorchRL.

Binary([n, shape, device, dtype])

A binary discrete tensor spec.

Bounded(*args, **kwargs)

A bounded tensor spec.

Categorical(n[, shape, device, dtype, mask])

A discrete tensor spec.

Composite(*args, **kwargs)

A composition of TensorSpecs.

DiscreteTensorSpec(*args, **kwargs)

Deprecated version of torchrl.data.Categorical.

LazyStackedCompositeSpec(*args, **kwargs)

Deprecated version of torchrl.data.StackedComposite.

MultiCategorical(nvec[, shape, device, ...])

A concatenation of discrete tensor spec.

MultiDiscreteTensorSpec(*args, **kwargs)

Deprecated version of torchrl.data.MultiCategorical.

MultiOneHot(nvec[, shape, device, dtype, ...])

A concatenation of one-hot discrete tensor spec.

NonTensor([shape, device, dtype, ...])

A spec for non-tensor data.

OneHot(n[, shape, device, dtype, ...])

A unidimensional, one-hot discrete tensor spec.

TensorSpec(shape, space, device, dtype, ...)

Parent class of the tensor meta-data containers.

Unbounded(*args, **kwargs)

An unbounded tensor spec.

UnboundedContinuous(*args, **kwargs)

A specialized version of torchrl.data.Unbounded with continuous space.

UnboundedDiscrete(*args, **kwargs)

A specialized version of torchrl.data.Unbounded with discrete space.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources