#ifndef TENSORFLOW_LITE_SUPPORT_CC_TASK_PROCESSOR_EMBEDDING_POSTPROCESSOR_H_
#define TENSORFLOW_LITE_SUPPORT_CC_TASK_PROCESSOR_EMBEDDING_POSTPROCESSOR_H_
#include <initializer_list>
#include <memory>
#include "absl/status/status.h"
#include "tensorflow_lite_support/cc/port/status_macros.h"
#include "tensorflow_lite_support/cc/port/statusor.h"
#include "tensorflow_lite_support/cc/task/core/tflite_engine.h"
#include "tensorflow_lite_support/cc/task/processor/processor.h"
#include "tensorflow_lite_support/cc/task/processor/proto/embedding_options.pb.h"
namespace tflite {
namespace task {
namespace processor {
class EmbeddingPostprocessor : public Postprocessor { … };
template <typename T>
absl::Status EmbeddingPostprocessor::Postprocess(T* embedding) { … }
template <typename T>
void EmbeddingPostprocessor::NormalizeFeatureVector(T* feature_vector) const { … }
template <typename T>
void EmbeddingPostprocessor::QuantizeFeatureVector(T* feature_vector) const { … }
template <typename T>
tflite::support::StatusOr<double>
EmbeddingPostprocessor::ComputeCosineSimilarity(const T* u, const T* v,
int num_elements) { … }
template <typename T>
tflite::support::StatusOr<double> EmbeddingPostprocessor::CosineSimilarity(
const T& u, const T& v) { … }
}
}
}
#endif