torch.unbind¶ torch.unbind(input, dim=0) → seq¶ 移除 tensor 維度。 傳回沿著給定維度的所有切片的元組,且不包含該維度。 參數 input (Tensor) – 要解除綁定的 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]))