diff options
author | 2018-08-15 17:10:25 -0700 | |
---|---|---|
committer | 2018-08-15 17:17:23 -0700 | |
commit | ec9d2891c3b1a5b9fd851f67a3cccf8ebaff38ad (patch) | |
tree | 010be4c118c80f17478e4536b36e91d57d07c742 /tensorflow/contrib/lite/model.cc | |
parent | c3ef5d7034a50ca1b500c6fabea9250d38628884 (diff) |
Internal change
PiperOrigin-RevId: 208910402
Diffstat (limited to 'tensorflow/contrib/lite/model.cc')
-rw-r--r-- | tensorflow/contrib/lite/model.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/model.cc b/tensorflow/contrib/lite/model.cc index 9edf5ba38f..7b9413cd17 100644 --- a/tensorflow/contrib/lite/model.cc +++ b/tensorflow/contrib/lite/model.cc @@ -26,6 +26,9 @@ limitations under the License. #ifndef TFLITE_MCU #include "tensorflow/contrib/lite/nnapi_delegate.h" #endif +#if defined(TFLITE_EXTENDED) +#include "tensorflow/contrib/lite/delegates/eager/delegate.h" +#endif #include "tensorflow/contrib/lite/version.h" namespace tflite { @@ -1040,6 +1043,14 @@ TfLiteStatus InterpreterBuilder::operator()( } (**interpreter).SetVariables(std::move(variables)); +#if defined(TFLITE_EXTENDED) + if (auto delegate = EagerDelegate::Create()) { + (**interpreter) + .ModifyGraphWithDelegate(std::move(delegate), + /*allow_dynamic_tensors=*/true); + } +#endif + return kTfLiteOk; } |