diff options
author | Sukriti Ramesh <sukritiramesh@google.com> | 2016-10-18 13:31:00 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-10-18 14:46:29 -0700 |
commit | 9bf2eb6d663ab1728db2708ea551e551c512919f (patch) | |
tree | 7362a442176158e473b5c25411ce110a117c7238 /tensorflow/cc/saved_model | |
parent | ffca44e327e02a38bdaab56b8c5ebd6f4b2ab69c (diff) |
Add tag constants for SavedModel cc.
Change: 136521066
Diffstat (limited to 'tensorflow/cc/saved_model')
-rw-r--r-- | tensorflow/cc/saved_model/BUILD | 6 | ||||
-rw-r--r-- | tensorflow/cc/saved_model/constants.h | 4 | ||||
-rw-r--r-- | tensorflow/cc/saved_model/loader_test.cc | 1 | ||||
-rw-r--r-- | tensorflow/cc/saved_model/tag_constants.h | 29 |
4 files changed, 36 insertions, 4 deletions
diff --git a/tensorflow/cc/saved_model/BUILD b/tensorflow/cc/saved_model/BUILD index 6a55ecf936..eeedaaff27 100644 --- a/tensorflow/cc/saved_model/BUILD +++ b/tensorflow/cc/saved_model/BUILD @@ -22,6 +22,11 @@ cc_library( ) cc_library( + name = "tag_constants", + hdrs = ["tag_constants.h"], +) + +cc_library( name = "loader", srcs = ["loader.cc"], hdrs = ["loader.h"], @@ -46,6 +51,7 @@ tf_cc_test( ":constants", ":loader", ":signature_constants", + ":tag_constants", "//tensorflow/core:lib", "//tensorflow/core:protos_all_cc", "//tensorflow/core:test", diff --git a/tensorflow/cc/saved_model/constants.h b/tensorflow/cc/saved_model/constants.h index 61ffa7a09a..f67c56ba1c 100644 --- a/tensorflow/cc/saved_model/constants.h +++ b/tensorflow/cc/saved_model/constants.h @@ -36,10 +36,6 @@ constexpr char kSavedModelVariablesDirectory[] = "variables"; // SavedModel variables filename. constexpr char kSavedModelVariablesFilename[] = "variables"; -// Commonly used tags. -constexpr char kSavedModelTagServe[] = "serve"; -constexpr char kSavedModelTagTrain[] = "train"; - } // namespace tensorflow #endif // THIRD_PARTY_TENSORFLOW_CC_SAVED_MODEL_CONSTANTS_H_ diff --git a/tensorflow/cc/saved_model/loader_test.cc b/tensorflow/cc/saved_model/loader_test.cc index fc21266518..a7e4d6cfde 100644 --- a/tensorflow/cc/saved_model/loader_test.cc +++ b/tensorflow/cc/saved_model/loader_test.cc @@ -17,6 +17,7 @@ limitations under the License. #include "tensorflow/cc/saved_model/constants.h" #include "tensorflow/cc/saved_model/signature_constants.h" +#include "tensorflow/cc/saved_model/tag_constants.h" #include "tensorflow/core/example/example.pb.h" #include "tensorflow/core/example/feature.pb.h" #include "tensorflow/core/framework/tensor_testutil.h" diff --git a/tensorflow/cc/saved_model/tag_constants.h b/tensorflow/cc/saved_model/tag_constants.h new file mode 100644 index 0000000000..8c4d12a57f --- /dev/null +++ b/tensorflow/cc/saved_model/tag_constants.h @@ -0,0 +1,29 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef THIRD_PARTY_TENSORFLOW_CC_SAVED_MODEL_TAG_CONSTANTS_H_ +#define THIRD_PARTY_TENSORFLOW_CC_SAVED_MODEL_TAG_CONSTANTS_H_ + +namespace tensorflow { + +// Tag for the `serving` graph. +constexpr char kSavedModelTagServe[] = "serve"; + +// Tag for the `training` graph.` +constexpr char kSavedModelTagTrain[] = "train"; + +} // namespace tensorflow + +#endif // THIRD_PARTY_TENSORFLOW_CC_SAVED_MODEL_TAG_CONSTANTS_H_ |