chromium/components/optimization_guide/core/model_validator.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/optimization_guide/core/model_validator.h"

#include <memory>
#include <vector>

#include "base/task/sequenced_task_runner.h"
#include "third_party/tflite/src/tensorflow/lite/c/common.h"
#include "third_party/tflite_support/src/tensorflow_lite_support/cc/task/core/task_utils.h"

namespace optimization_guide {

ModelValidatorHandler::ModelValidatorHandler(
    OptimizationGuideModelProvider* model_provider,
    scoped_refptr<base::SequencedTaskRunner> background_task_runner)
    :{}

ModelValidatorHandler::~ModelValidatorHandler() = default;

void ModelValidatorHandler::OnModelExecutionComplete(
    const std::optional<float>& output) {}

void ModelValidatorHandler::OnModelUpdated(
    optimization_guide::proto::OptimizationTarget optimization_target,
    base::optional_ref<const optimization_guide::ModelInfo> model_info) {}

ModelValidatorExecutor::ModelValidatorExecutor() = default;

ModelValidatorExecutor::~ModelValidatorExecutor() = default;

bool ModelValidatorExecutor::Preprocess(
    const std::vector<TfLiteTensor*>& input_tensors,
    const std::vector<float>& input) {}

std::optional<float> ModelValidatorExecutor::Postprocess(
    const std::vector<const TfLiteTensor*>& output_tensors) {}

}  // namespace optimization_guide