Well, thank you so much, Alex. The nice indexing trick.
I think after this the desired values are copied to the consecutive memory space. Then I can use resize_ method to crop the tensor.
A really great job. I have already known how to do.
Thank you!