stack¶ class tensordict.stack(input: Sequence[T], dim: int = 0, *, out=None)¶ 沿給定維度將 tensordicts 堆疊成一個單一的 tensordict。 此呼叫等效於呼叫 torch.stack(),但與 torch.compile 相容。