You can always convert to/from numpy tensors just before you need torch tensors with the utility functions e.g.,
https://pytorch.org/docs/stable/generated/torch.from_numpy.html 1
and yourtensor.numpy()