dummy_output

hybrid_learning.concepts.models.model_extension.dummy_output(model, input_size, layer_ids=None)[source]

Select dummy output of model’s given or all layers for all-zero tensor of input_size.

Parameters
  • input_size (Sequence[int]) – input size of one sample to feed in (make sure to include batch dimension!)

  • model (Module) – the model to investigate

  • layer_ids (Optional[Sequence[str]]) – the layers to investigate; defaults to all listed in the model’s named_modules

Returns

a dict of the outputs for each layer ID

Return type

Dict[str, Any]