draugr.torch_utilities.datasets.non_sequential_dataset.NonSequentialDataset¶
- class draugr.torch_utilities.datasets.non_sequential_dataset.NonSequentialDataset(*arrays: ndarray)[source]¶
Bases:
Dataset
N
- number of parallel environmentsT
- number of time steps explored in environments
Dataset that flattens
N*T*...
arrays intoB*...
(whereB
is equal toN*T
) and returns such rows one by one. So basically we loose information about sequence order and we return for example one state, action and reward per row.It can be used for
Model
’s that does not need to keep the order of events like MLP models.For
LSTM
use another implementation that will slice the dataset differently- __init__(*arrays: ndarray) None [source]¶
- Parameters
arrays – arrays to be flattened from
N*T*...
toB*...
and returned in each call to get
item
Methods
__init__
(*arrays)- param arrays
arrays to be flattened from
N*T*...
toB*...
and returned in each call to get