#include "components/assist_ranker/classifier_predictor.h"
#include <memory>
#include <utility>
#include <vector>
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "components/assist_ranker/example_preprocessing.h"
#include "components/assist_ranker/nn_classifier.h"
#include "components/assist_ranker/proto/ranker_model.pb.h"
#include "components/assist_ranker/ranker_model.h"
#include "components/assist_ranker/ranker_model_loader_impl.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
namespace assist_ranker {
ClassifierPredictor::ClassifierPredictor(const PredictorConfig& config)
: … { … }
ClassifierPredictor::~ClassifierPredictor() { … }
std::unique_ptr<ClassifierPredictor> ClassifierPredictor::Create(
const PredictorConfig& config,
const base::FilePath& model_path,
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory) { … }
bool ClassifierPredictor::Predict(const std::vector<float>& features,
std::vector<float>* prediction) { … }
bool ClassifierPredictor::Predict(RankerExample example,
std::vector<float>* prediction) { … }
RankerModelStatus ClassifierPredictor::ValidateModel(const RankerModel& model) { … }
bool ClassifierPredictor::Initialize() { … }
}