SliceBlock¶
- class maze.perception.blocks.general.slice.SliceBlock(*args: Any, **kwargs: Any)¶
A slicing block. This is for example useful for slicing the last time step in recurrent blocks by its index.
- Parameters:
in_keys – One key identifying the input tensors.
out_keys – One key identifying the output tensors.
in_shapes – List of input shapes.
slice_dim – The dimension to slice from.
slice_idx – The index to slice.
- forward(block_input: Dict[str, torch.Tensor]) Dict[str, torch.Tensor]¶
(overrides
PerceptionBlock)implementation of
PerceptionBlockinterface