aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/tools/mutable_op_resolver.h
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/contrib/lite/tools/mutable_op_resolver.h')
-rw-r--r--tensorflow/contrib/lite/tools/mutable_op_resolver.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/tools/mutable_op_resolver.h b/tensorflow/contrib/lite/tools/mutable_op_resolver.h
index 9546c32427..a51fdaee19 100644
--- a/tensorflow/contrib/lite/tools/mutable_op_resolver.h
+++ b/tensorflow/contrib/lite/tools/mutable_op_resolver.h
@@ -19,6 +19,17 @@ limitations under the License.
#include "tensorflow/contrib/lite/context.h"
#include "tensorflow/contrib/lite/model.h"
+// Needed to resolve unordered_set hash on older compilers.
+namespace std
+{
+template<>
+ struct hash<tflite::BuiltinOperator> {
+ size_t operator()(const tflite::BuiltinOperator &op) const {
+ return std::hash<int>()(op);
+ }
+ };
+}
+
namespace tflite {
// An OpResolver that is mutable, also used as the op in gen_op_registration.