    def register(self, layer_name: str):
        """
        Registration for embedding extraction.
        Args:
            layer_name (`str`):
                Name of the layer from which the embedding is extracted.
        """
        if layer_name in self.modules_dict:
            layer = self.modules_dict[layer_name]
            layer.register_forward_hook(self.emb_out)
        else:
            raise ValueError('layer_name not in modules')
Registration for embedding extraction.
Args:
layer_name (`str`):
Name of the layer from which the embedding is extracted.
towhee/models/embedding/embedding_extractor.py