Can I save a custom datasest for later use?

Hi all,
I have a set of data in .mat file and I would like to create a set a custom datasest. I get the idea of how to create a datalset as following(is this the right way?). My question is, when I get the TensorDataset, can I save it for later use? If not, what is the correct way to create a custom dataset that can be used many times?

Thank you!

import torch.utils.data as utils

my_x = [np.array([[1.0,2],[3,4]]),np.array([[5.,6],[7,8]])] # a list of numpy arrays
my_y = [np.array([4.]), np.array([2.])] # another list of numpy arrays (targets)

tensor_x = torch.stack([torch.Tensor(i) for i in my_x]) # transform to torch tensors
tensor_y = torch.stack([torch.Tensor(i) for i in my_y])

my_dataset = utils.TensorDataset(tensor_x,tensor_y) # create your datset
my_dataloader = utils.DataLoader(my_dataset) # create your dataloader