stack¶
- class tensordict.stack(input: Sequence[T], dim: int = 0, *, out=None)¶
沿给定维度将 tensordicts 堆叠成一个单一的 tensordict。
此调用等效于调用
torch.stack()
,但与 torch.compile 兼容。
沿给定维度将 tensordicts 堆叠成一个单一的 tensordict。
此调用等效于调用 torch.stack()
,但与 torch.compile 兼容。