dbp.pat94:

How do I detach only certain indices/slices of the original Tensor.


You cannot do that I am afraid. The requires_grad property is only for a full Tensor and cannot be set for a subset of it only.
If you put them in a list though, you can set these attributes on each Tensor as needed.