I have the tensor:
te = tensor([0.0039, 0.0039, 0.0039,  ..., 0.0039, 0.0039, 0.0039])

Slicing it likewise returns an empty array with shape (0, 300):
roi = [0, 40, 300, 510]   # example values
te_cropped = te[roi[0] : roi[2], roi[1] : roi[3]]

Here is some more info:
u_mask: tensor([0.0039, 0.0039, 0.0039,  ..., 0.0039, 0.0039, 0.0039]); te_cropped: tensor([])                                                                                                                                                                                                                                                                                              te_shape: torch.Size([1091, 300])                                                                                                                                                                                                                                                                                                                                                              te_cropped_shape: torch.Size([300, 0])

Any ideas what is happening here?