You are looking for torch.chunk 44 or torch.split 20. For example, you have tensor x of size [8, 2, 2], you want to convert it into two tensor of size [4, 2, 2] along the dim 0, you can use the following:
torch.split(x, 4, dim=0)
# or you can use torch.chunk(x, 2, dim=0)