From 8531803462e98974d19f9c1c7d507ebdd4493ef1 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Fri, 27 Jan 2023 11:08:39 +0530 Subject: [PATCH] Updated documentation of embedding containers --- .../tasks/ios/components/containers/sources/MPPEmbedding.h | 1 - .../tasks/ios/components/containers/sources/MPPEmbedding.m | 1 - .../ios/components/containers/sources/MPPEmbeddingResult.h | 2 +- .../ios/text/text_embedder/sources/MPPTextEmbedderOptions.h | 4 ++-- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/mediapipe/tasks/ios/components/containers/sources/MPPEmbedding.h b/mediapipe/tasks/ios/components/containers/sources/MPPEmbedding.h index a9db8e57..b2104990 100644 --- a/mediapipe/tasks/ios/components/containers/sources/MPPEmbedding.h +++ b/mediapipe/tasks/ios/components/containers/sources/MPPEmbedding.h @@ -54,7 +54,6 @@ NS_SWIFT_NAME(Embedding) * * @return An instance of `MPPEmbedding` initialized with the given float embedding, quantized * embedding, head index and head name. - * */ - (instancetype)initWithFloatEmbedding:(nullable float *)floatEmbedding quantizedEmbedding:(nullable char *)quantizedEmbedding diff --git a/mediapipe/tasks/ios/components/containers/sources/MPPEmbedding.m b/mediapipe/tasks/ios/components/containers/sources/MPPEmbedding.m index 642853ef..a4c1e224 100644 --- a/mediapipe/tasks/ios/components/containers/sources/MPPEmbedding.m +++ b/mediapipe/tasks/ios/components/containers/sources/MPPEmbedding.m @@ -20,7 +20,6 @@ quantizedEmbedding:(nullable char *)quantizedEmbedding headIndex:(NSInteger)headIndex headName:(nullable NSString *)headName { - // TODO: Should null check for embeddings be done here ? self = [super init]; if (self) { _headIndex = headIndex; diff --git a/mediapipe/tasks/ios/components/containers/sources/MPPEmbeddingResult.h b/mediapipe/tasks/ios/components/containers/sources/MPPEmbeddingResult.h index 3d5d48b9..8fd9b9df 100644 --- a/mediapipe/tasks/ios/components/containers/sources/MPPEmbeddingResult.h +++ b/mediapipe/tasks/ios/components/containers/sources/MPPEmbeddingResult.h @@ -30,7 +30,7 @@ NS_SWIFT_NAME(EmbeddingResult) * @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 + * 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. */ @property(nonatomic, readonly) NSInteger timestampMs; diff --git a/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedderOptions.h b/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedderOptions.h index ce9fc8b2..fd2a7034 100644 --- a/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedderOptions.h +++ b/mediapipe/tasks/ios/text/text_embedder/sources/MPPTextEmbedderOptions.h @@ -29,7 +29,7 @@ NS_SWIFT_NAME(TextEmbedderptions) * Use this option only if the model does not already contain a native L2_NORMALIZATION TF Lite Op. * In most cases, this is already the case and L2 norm is thus achieved through TF Lite inference. * - * NO by default. + * `NO` by default. */ @property(nonatomic) BOOL l2Normalize; @@ -38,7 +38,7 @@ NS_SWIFT_NAME(TextEmbedderptions) * Embeddings are implicitly assumed to be unit-norm and therefore any dimensions is guaranteed to * have value in [-1.0, 1.0]. Use the `l2Normalize` property if this is not the case. * - * NO by default. + * `NO` by default. */ @property(nonatomic) BOOL quantize;