How to separate conv1d channels?

If i have a tensor of shape (batch_size,channels,features), how do i separate it into a list of tensors of shape (batch_size,1,features) with length of channels?

Answer found: use torch.split(tensor,1,channel_dim_index)|

So if tensor is of shape (3,100,250), use torch.split(tensor,1,1) to get a tuple of 100 tensor of shape (3,1,250)