jina.executors.encoders.multimodal

class jina.executors.encoders.multimodal.BaseMultiModalEncoder(positional_modality, *args, **kwargs)[source]

Bases: jina.executors.BaseExecutor

BaseMultiModalEncoder encodes data from multiple inputs (text, buffer, blob or other embeddings) into a single embedding

Parameters

positional_modality (Sequence[str]) – the list of arguments indicating in which order the modalities they need to come

for the encoding method :return:

encode(*data, **kwargs)[source]
Param

data: M arguments of shape B x (D) numpy ndarray, B is the size of the batch, M is the number of modalities

Return type

ndarray

Returns

a B x D numpy ndarray