FlattenBlock

class maze.perception.blocks.general.flatten.FlattenBlock(*args: Any, **kwargs: Any)

A flattening block.

Parameters
  • in_keys – One key identifying the input tensors.

  • out_keys – One key identifying the output tensors.

  • in_shapes – List of input shapes.

  • num_flatten_dims – the number of dimensions to flatten out (from right).

forward(block_input: Dict[str, torch.Tensor]) → Dict[str, torch.Tensor]

(overrides PerceptionBlock)

implementation of PerceptionBlock interface