stack¶ class tensordict.stack(input, dim=0, *, out=None)¶ 沿給定維度將 tensordicts 堆疊成單個 tensordict。 此呼叫等同於呼叫 torch.stack(),但與 torch.compile 相容。