meddlr.modeling.layers.get_layer_kind#

meddlr.modeling.layers.get_layer_kind(layer_type: Union[type, str]) str[source]#

Returns the layer kind based on the layer type.

The layer kind is a string that describes the kind of layer:

  • “conv”: Convolutional layer.

  • “norm”: Normalization layer.

  • “act”: Activation layer.

  • “dropout”: Dropout layer.

  • “unknown”: Unknown layer.

This delineation is useful for building models that order layers based on their kind. For example, a model with layers conv->norm->act->dropout would need to know the kind of the different types of the layers to organize them appropriately.

TODO: Add support for pooling layers.

Parameters

layer_type (Union[type, str]) – Layer type.

Returns

Layer kind.

Return type

str