coopihczoo.teaching.scripts_to_sort.behavioral_cloning_original.TransitionsMinimal¶
- class coopihczoo.teaching.scripts_to_sort.behavioral_cloning_original.TransitionsMinimal(obs: numpy.ndarray, acts: numpy.ndarray, infos: numpy.ndarray)[source]¶
Bases:
torch.utils.data.dataset.Dataset
A Torch-compatible Dataset of obs-act transitions.
This class and its subclasses are usually instantiated via imitation.data.rollout.flatten_trajectories.
Indexing an instance trans of TransitionsMinimal with an integer i returns the i`th `Dict[str, np.ndarray] sample, whose keys are the field names of each dataclass field and whose values are the ith elements of each field value.
Slicing returns a possibly empty instance of TransitionsMinimal where each field has been sliced.
Methods
register_datapipe_as_function
register_function
Attributes
functions
Previous observations.
Actions.
Array of info dicts.
- acts: numpy.ndarray¶
Actions. Shape: (batch_size,) + action_shape.
- infos: numpy.ndarray¶
Array of info dicts. Shape: (batch_size,).
- obs: numpy.ndarray¶
Previous observations. Shape: (batch_size, ) + observation_shape.
The i’th observation obs[i] in this array is the observation seen by the agent when choosing action acts[i]. obs[i] is not required to be from the timestep preceding obs[i+1].