core.utils.torchutils.split_dataset_into_train_and_test
core.utils.torchutils.split_dataset_into_train_and_test(dataset, train_fraction)Splits dataset into a trainset of size int(train_fraction * len(dataset)), and a testset with the remainder. Uses fixed random seed for reproducibility.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| dataset | dataset to be split | required | |
| train_fraction | fraction of the dataset to be used for trainset | required |
Returns
| Name | Type | Description |
|---|---|---|
| (trainset, testset) |