#include "tensorflow/contrib/lite/context.h"
#include "tensorflow/contrib/lite/error_reporter.h"
#include "tensorflow/contrib/lite/memory_planner.h"
+#include "tensorflow/contrib/lite/schema/schema_generated.h"
namespace tflite {
// contain new nodes that replace 1 more nodes.
TfLiteStatus ModifyGraphWithDelegate(TfLiteDelegate* delegate);
+ // WARNING: This is a deprecated interface and will be removed as soon as
+ // possible. Please do not use it.
+ // TODO(impjdi): Remove this interface after resolving dependencies.
+ void set_model(const Model* model) { model_ = const_cast<Model*>(model); }
+ Model* model() const { return model_; }
+
private:
// Give 'op_reg' a chance to initialize itself using the contents of
// 'buffer'.
std::unique_ptr<NNAPIDelegate> nnapi_delegate_;
std::unique_ptr<MemoryPlanner> memory_planner_;
+
+ // WARNING: This is a deprecated interface and will be removed as soon as
+ // possible. Please do not use it.
+ // TODO(impjdi): Remove this interface after resolving dependencies.
+ Model* model_ = nullptr;
};
} // namespace tflite
return cleanup_and_error();
}
+ (**interpreter).set_model(model_);
+
// Parse inputs/outputs
(**interpreter).SetInputs(FlatBufferIntArrayToVector(subgraph->inputs()));
(**interpreter).SetOutputs(FlatBufferIntArrayToVector(subgraph->outputs()));