You could split the dataset before training e.g. via random_split or better using sklearn.model_selection.KFold 1 and train each split separately.
Alternatively, skorch 2 provides a higher-level API for PyTorch, which is sklearn-compatible.