vp_suite.utils.dataset_wrapper
- class VPDatasetWrapper(dataset_class, split, **dataset_kwargs)
Bases:
object
A class that wraps VPDataset instances to handle training and testing data in the same way.
- ALLOWED_SPLITS = ['train', 'test']
On creation, the wrapper must be initialized with one of these split values.
- property NAME
Returns the dataset name.
- __init__(dataset_class, split, **dataset_kwargs)
Instantiates the dataset class specified by the given dataset_class value and split identifier.
- Parameters
dataset_class (Any) – A string identifier corresponding to the dataset class that should be instantiated.
split (str) – A string specifying whether this Wrapper should wrap a training/validation or a test set.
**dataset_kwargs (Any) – Additional optional dataset configuration arguments.
- property action_size
Returns the dataset’s action size (which is 0 for datasets that don’t provide actions)
- property config
Returns a dictionary containing the dataset’s configuration parameters.
- property data_dir
Returns the dataset’s data location
- property img_shape
Returns the shape of each frame of the sequences that will be provided by the dataset (after preprocessing)
- is_test_set()
Returns True if this wrapper wraps testing fata, false otherwise.
- is_training_set()
Returns True if this wrapper wraps training/validation data, false otherwise.
- reset_rng()
Resets the RNG for all wrapped datasets.
- set_seq_len(context_frames, pred_frames, seq_step)
Sets the desired sequence length for all wrapped datasets by calculating the needed sequence length from the provided sequence parameters
- Parameters
- property test_data
Returns the wrapped test dataset. If not existent, raises an error.
- property train_data
Returns the wrapped training dataset. If not existent, raises an error.
- property val_data
Returns the wrapped validation dataset. If not existent, raises an error.