towhee.models.embedding.embedding_extractor.EmbeddingExtractor

class towhee.models.embedding.embedding_extractor.EmbeddingExtractor(model)[source]

Bases: object

Embedding extractor from a layer :param model: Model used for inference. :type model: nn.Module

Methods

disp_modules

Display the the modules of the model.

register

Registration for embedding extraction.

__init__(model)[source]

Initialize self. See help(type(self)) for accurate signature.

disp_modules(full=False)[source]

Display the the modules of the model.

register(layer_name: str)[source]

Registration for embedding extraction. :param layer_name: Name of the layer from which the embedding is extracted. :type layer_name: str