Shortcuts

VIPRewardTransform

class torchrl.envs.transforms.VIPRewardTransform(*args, **kwargs)[source]

A VIP transform to compute rewards based on embedded similarity.

This class will update the reward computation

forward(tensordict)[source]

Reads the input tensordict, and for the selected keys, applies the transform.

transform_input_spec(input_spec: TensorSpec) TensorSpec[source]

Transforms the input spec such that the resulting spec matches transform mapping.

Parameters:

input_spec (TensorSpec) – spec before the transform

Returns:

expected spec after the transform

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