#include "tensorflow_lite_support/cc/task/core/tflite_engine.h"
#if defined(OS_POSIX) || defined(OS_FUCHSIA)
#include <unistd.h>
#endif
#include <memory>
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
#include "tensorflow/lite/builtin_ops.h"
#include "tensorflow/lite/kernels/register.h"
#include "tensorflow/lite/stderr_reporter.h"
#include "tensorflow/lite/tools/verifier.h"
#include "tensorflow_lite_support/cc/common.h"
#include "tensorflow_lite_support/cc/port/configuration_proto_inc.h"
#include "tensorflow_lite_support/cc/port/status_macros.h"
#include "tensorflow_lite_support/cc/task/core/external_file_handler.h"
namespace tflite {
namespace task {
namespace core {
StatusCode;
ComputeSettings;
CreateStatusWithPayload;
InterpreterCreationResources;
TfLiteSupportStatus;
bool TfLiteEngine::Verifier::Verify(const char* data, int length,
tflite::ErrorReporter* reporter) { … }
TfLiteEngine::TfLiteEngine(std::unique_ptr<tflite::OpResolver> resolver)
: … { … }
std::vector<TfLiteTensor*> TfLiteEngine::GetInputs() { … }
std::vector<const TfLiteTensor*> TfLiteEngine::GetOutputs() { … }
void TfLiteEngine::VerifyAndBuildModelFromBuffer(
const char* buffer_data, size_t buffer_size,
TfLiteVerifier* extra_verifier) { … }
absl::Status TfLiteEngine::InitializeFromModelFileHandler(
const tflite::proto::ComputeSettings& compute_settings) { … }
absl::Status TfLiteEngine::BuildModelFromFlatBuffer(
const char* buffer_data, size_t buffer_size,
const tflite::proto::ComputeSettings& compute_settings) { … }
absl::Status TfLiteEngine::BuildModelFromFile(
const std::string& file_name,
const tflite::proto::ComputeSettings& compute_settings) { … }
absl::Status TfLiteEngine::BuildModelFromFileDescriptor(
int file_descriptor,
const tflite::proto::ComputeSettings& compute_settings) { … }
absl::Status TfLiteEngine::BuildModelFromExternalFileProto(
const ExternalFile* external_file,
const tflite::proto::ComputeSettings& compute_settings) { … }
absl::Status TfLiteEngine::BuildModelFromExternalFileProto(
std::unique_ptr<ExternalFile> external_file) { … }
absl::Status TfLiteEngine::InitInterpreter(int num_threads) { … }
absl::Status TfLiteEngine::InitInterpreter(
const tflite::proto::ComputeSettings& compute_settings, int num_threads) { … }
absl::Status TfLiteEngine::InitInterpreter(
const tflite::proto::ComputeSettings& compute_settings) { … }
}
}
}