torch.unbind¶ torch.unbind(input, dim=0) → seq¶ 移除一个张量维度。 返回沿给定维度所有切片的元组,已经不包含该维度。 Parameters 输入 (Tensor) – 要解绑的张量 dim (int) – 要移除的维度 示例: >>> torch.unbind(torch.tensor([[1, 2, 3], >>> [4, 5, 6], >>> [7, 8, 9]])) (tensor([1, 2, 3]), tensor([4, 5, 6]), tensor([7, 8, 9]))