[2] Review comments handled
This commit is contained in:
parent
155e74fc4d
commit
a3e0328146
@ -176,6 +176,21 @@ void SingleOpModel::Invoke() { ASSERT_EQ(interpreter_->Invoke(), kTfLiteOk); }
|
|||||||
|
|
||||||
TfLiteStatus SingleOpModel::InvokeUnchecked() { return interpreter_->Invoke(); }
|
TfLiteStatus SingleOpModel::InvokeUnchecked() { return interpreter_->Invoke(); }
|
||||||
|
|
||||||
|
void SingleOpModel::BuildInterpreter(
|
||||||
|
std::vector<std::vector<int>> input_shapes) {
|
||||||
|
BuildInterpreter(input_shapes, -1, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SingleOpModel::BuildInterpreter(std::vector<std::vector<int>> input_shapes,
|
||||||
|
int num_threads) {
|
||||||
|
BuildInterpreter(input_shapes, num_threads, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SingleOpModel::BuildInterpreter(std::vector<std::vector<int>> input_shapes,
|
||||||
|
bool allow_fp32_relax_to_fp16) {
|
||||||
|
BuildInterpreter(input_shapes, -1, allow_fp32_relax_to_fp16);
|
||||||
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void SingleOpModel::SetForceUseNnapi(bool use_nnapi) {
|
void SingleOpModel::SetForceUseNnapi(bool use_nnapi) {
|
||||||
force_use_nnapi = use_nnapi;
|
force_use_nnapi = use_nnapi;
|
||||||
|
@ -250,8 +250,15 @@ class SingleOpModel {
|
|||||||
// Build the interpreter for this model. Also, resize and allocate all
|
// Build the interpreter for this model. Also, resize and allocate all
|
||||||
// tensors given the shapes of the inputs.
|
// tensors given the shapes of the inputs.
|
||||||
void BuildInterpreter(std::vector<std::vector<int>> input_shapes,
|
void BuildInterpreter(std::vector<std::vector<int>> input_shapes,
|
||||||
int num_threads = -1,
|
int num_threads, bool allow_fp32_relax_to_fp16);
|
||||||
bool allow_fp32_relax_to_fp16 = false);
|
|
||||||
|
void BuildInterpreter(std::vector<std::vector<int>> input_shapes,
|
||||||
|
int num_threads);
|
||||||
|
|
||||||
|
void BuildInterpreter(std::vector<std::vector<int>> input_shapes,
|
||||||
|
bool allow_fp32_relax_to_fp16);
|
||||||
|
|
||||||
|
void BuildInterpreter(std::vector<std::vector<int>> input_shapes);
|
||||||
|
|
||||||
// Executes inference, asserting success.
|
// Executes inference, asserting success.
|
||||||
void Invoke();
|
void Invoke();
|
||||||
|
Loading…
Reference in New Issue
Block a user