diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-07-02 02:08:14 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-02 02:10:53 -0700 |
commit | f2ed5222f1b08e8d5cb741e336e129a87fe3009a (patch) | |
tree | 074b38c43cfd755f02f8fd6a8433bb0a7d95e007 /tensorflow/contrib/lite/nnapi_delegate.h | |
parent | 3d83b5853c41a3b0ba18df0c586e4803b5bef200 (diff) |
- Create an explicit mapping between tensor indices and NNAPI operand ids (
needed for RNN back-edge support)
- Make the delegate return errors from unsupported operations, datatypes and
rank rather than abort
- Make the delegate propagate errors from preparation and compilation phase
rather than abort
- Add a flag for allowing generated tests to pass if delegation returns an
error - however if delegation succeeds the results are verified
PiperOrigin-RevId: 202916432
Diffstat (limited to 'tensorflow/contrib/lite/nnapi_delegate.h')
-rw-r--r-- | tensorflow/contrib/lite/nnapi_delegate.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tensorflow/contrib/lite/nnapi_delegate.h b/tensorflow/contrib/lite/nnapi_delegate.h index 94dea4f9b2..8dc7d38a30 100644 --- a/tensorflow/contrib/lite/nnapi_delegate.h +++ b/tensorflow/contrib/lite/nnapi_delegate.h @@ -59,14 +59,16 @@ class NNAPIDelegate { ANeuralNetworksModel* nn_model_ = nullptr; // The NN API compilation handle ANeuralNetworksCompilation* nn_compiled_model_ = nullptr; + // Model status + TfLiteStatus model_status_ = kTfLiteOk; // List of state tensors for LSTM, RNN, SVDF. // NN API does not allow ops to maintain states across multiple // invocations. We need to manually create state input tensors from // corresponding state output tensors of TFLite operations, and map them // correctly. - std::vector<int> model_states_inputs_; - std::vector<int> model_states_outputs_; + std::vector<int> model_states_inputs_; // holds NNAPI operand ids + std::vector<int> model_states_outputs_; // holds TFLite tensor ids }; } // namespace tflite |