PinMemoryTransform¶ class torchrl.envs.transforms.PinMemoryTransform[source]¶ 在 tensordict 上调用 pin_memory 以方便在 CUDA 设备上写入。 forward(tensordict: TensorDictBase) → TensorDictBase¶ 读取输入 tensordict,并为选定的键应用转换。