EmbeddingResult
class EmbeddingResult : NSObjectRepresents the embedding results of a model. Typically used as a result for embedding tasks.
-
An Array of
MPPEmbeddingobjects containing the embedding results for each head of the model.Declaration
Swift
var embeddings: [Embedding] { get } -
@brief The optional timestamp (in milliseconds) of the start of the chunk of data corresponding to these results. This is only used for embedding extraction on time series (e.g. audio embedder). In these use cases, the amount of data to process might exceed the maximum size that the model can process. To solve this, the input data is split into multiple chunks starting at different timestamps.
Declaration
Swift
var timestampInMilliseconds: Int { get } -
Initializes a new
MPPEmbeddingwith the given array of embeddings and timestamp (in milliseconds).Declaration
Swift
init(embeddings: [Embedding], timestampInMilliseconds: Int)Parameters
embeddingsAn Array of
MPPEmbeddingobjects containing the embedding results for each head of the model.timestampInMillisecondsThe optional timestamp (in milliseconds) of the start of the chunk of data corresponding to these results. Pass
0if timestamp is absent.Return Value
An instance of
MPPEmbeddingResultinitialized with the given array of embeddings and timestamp (in milliseconds). -
Undocumented
-
Undocumented