bitorch_engine.utils.convert.collect_layers

bitorch_engine.utils.convert.collect_layers(module, layer_types=None, parent_name='')[source]

Collect the names of all layers within a module recursively with certain types.

Parameters:
  • module – the model

  • layer_types – the desired layer types

  • parent_name – the name of the parent (usually empty when called directly)

Returns:

a list of names of all layers with the desired types