CorrelationBlock

class maze.perception.blocks.general.correlation.CorrelationBlock(*args: Any, **kwargs: Any)

A feature correlation block.

This block takes two feature representation as an input and correlates them along the last dimension. If the blocks do not have the same number of dimensions additional 1d-dimensions are added to allow for broadcasting.

Parameters
  • in_keys – Keys identifying the input tensors.

  • out_keys – Keys identifying the output tensors.

  • in_shapes – List of input shapes.

  • reduce – If True a sum reduction as applied along dim=-1.

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

(overrides PerceptionBlock)

implementation of PerceptionBlock interface