stack¶ class tensordict.stack(input, dim=0, *, out=None)¶ 沿着给定维度将 tensordicts 堆叠成一个 tensordict。 此调用等同于调用 torch.stack(),但与 torch.compile 兼容。