I am working on one of my University assignments and there is one sub-task that says. Split the data in two (Train and Validation) while using a fixed seed to ensure reproducibility. I have written some code that is working fine but I want to know whether it is the correct way or not?
torch.manual_seed(0)
mnist_train, mnist_val = torch.utils.data.random_split(mnist_rest, [54000,6000])

I am working on the MNIST dataset.