InferenceBlock

class maze.perception.blocks.inference.InferenceBlock(*args: Any, **kwargs: Any)
An inference block combining multiple perception blocks into one prediction module.
Conditions on using the InferenceBlock object:
  1. All keys of the perception_blocks dictionary have to be unique

  2. All out_keys used when creating the blocks have to be unique

  3. All block keys in the perception_blocks dict have to sub-strings of all their corresponding out_keys

  4. The given in_keys should be a subset of the inputs of the computational graph

  5. The given out_keys should be a subset of the outputs of the computational graph

Parameters
  • in_keys – Keys identifying the input tensors.

  • out_keys – Keys identifying the output tensors.

  • in_shapes – List of input shapes.

  • perception_blocks – Dictionary of perception blocks.

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

(overrides PerceptionBlock)

implementation of PerceptionBlock interface