diff options
author | Skye Wanderman-Milne <skyewm@google.com> | 2017-01-17 13:35:16 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-01-17 13:48:24 -0800 |
commit | 7a0d788c2697af366c6814396ce07cfed7c4bd60 (patch) | |
tree | 382e9bc1e1553f848e57aa8237a6879f69d52b2e /tensorflow/cc/saved_model | |
parent | dbf4e01d6fbb7beb1ff2aed6d847da6605cb49e2 (diff) |
Update C++ API comments to be more Doxygen friendly.
This patch:
- Updates // comments to ///. I manually reverted some comments that shouldn't be docs (e.g. TODOs), but may have missed some.
- Indents code blocks so they get formatted as such in the docs.
- Removes /* */ comments from example code since it messes up Doxygen.
- Puts a space between {{ and }} since it messes up devsite.
- Adds some // START_SKIP_DOXYGEN and // END_SKIP_DOXYGEN comments for functions that aren't part of the public API (incomplete)
This will likely require further small fixups, but this gets something to be generated.
Change: 144749351
Diffstat (limited to 'tensorflow/cc/saved_model')
-rw-r--r-- | tensorflow/cc/saved_model/constants.h | 14 | ||||
-rw-r--r-- | tensorflow/cc/saved_model/loader.h | 26 | ||||
-rw-r--r-- | tensorflow/cc/saved_model/signature_constants.h | 32 | ||||
-rw-r--r-- | tensorflow/cc/saved_model/tag_constants.h | 4 |
4 files changed, 38 insertions, 38 deletions
diff --git a/tensorflow/cc/saved_model/constants.h b/tensorflow/cc/saved_model/constants.h index 654e765170..7f2d560978 100644 --- a/tensorflow/cc/saved_model/constants.h +++ b/tensorflow/cc/saved_model/constants.h @@ -18,25 +18,25 @@ limitations under the License. namespace tensorflow { -// SavedModel assets directory. +/// SavedModel assets directory. constexpr char kSavedModelAssetsDirectory[] = "assets"; -// SavedModel assets key for graph collection-def. +/// SavedModel assets key for graph collection-def. constexpr char kSavedModelAssetsKey[] = "saved_model_assets"; -// SavedModel proto filename. +/// SavedModel proto filename. constexpr char kSavedModelFilenamePb[] = "saved_model.pb"; -// SavedModel text format proto filename. +/// SavedModel text format proto filename. constexpr char kSavedModelFilenamePbTxt[] = "saved_model.pbtxt"; -// SavedModel legacy init op key. +/// SavedModel legacy init op key. constexpr char kSavedModelLegacyInitOpKey[] = "legacy_init_op"; -// Directory in which to save the SavedModel variables. +/// Directory in which to save the SavedModel variables. constexpr char kSavedModelVariablesDirectory[] = "variables"; -// SavedModel variables filename. +/// SavedModel variables filename. constexpr char kSavedModelVariablesFilename[] = "variables"; } // namespace tensorflow diff --git a/tensorflow/cc/saved_model/loader.h b/tensorflow/cc/saved_model/loader.h index 10157b0a99..9b9abdbb1f 100644 --- a/tensorflow/cc/saved_model/loader.h +++ b/tensorflow/cc/saved_model/loader.h @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -// SavedModel loading functions and SavedModelBundle struct. +/// SavedModel loading functions and SavedModelBundle struct. #ifndef THIRD_PARTY_TENSORFLOW_CC_SAVED_MODEL_LOADER_H_ #define THIRD_PARTY_TENSORFLOW_CC_SAVED_MODEL_LOADER_H_ @@ -27,13 +27,13 @@ limitations under the License. namespace tensorflow { -// SavedModel representation once the SavedModel is loaded from storage. +/// SavedModel representation once the SavedModel is loaded from storage. struct SavedModelBundle { std::unique_ptr<Session> session; MetaGraphDef meta_graph_def; - // A TensorFlow Session does not Close itself on destruction. To avoid - // resource leaks, we explicitly call Close on Sessions that we create. + /// A TensorFlow Session does not Close itself on destruction. To avoid + /// resource leaks, we explicitly call Close on Sessions that we create. ~SavedModelBundle() { if (session) { session->Close(); @@ -43,20 +43,20 @@ struct SavedModelBundle { SavedModelBundle() = default; }; -// Loads a SavedModel from the specified export directory. The meta graph def to -// be loaded is identified by the supplied tags, corresponding exactly to the -// set of tags used at SavedModel build time. Returns a SavedModel bundle with a -// session and the requested meta graph def, if found. +/// Loads a SavedModel from the specified export directory. The meta graph def +/// to be loaded is identified by the supplied tags, corresponding exactly to +/// the set of tags used at SavedModel build time. Returns a SavedModel bundle +/// with a session and the requested meta graph def, if found. Status LoadSavedModel(const SessionOptions& session_options, const RunOptions& run_options, const string& export_dir, const std::unordered_set<string>& tags, SavedModelBundle* const bundle); -// Checks whether the provided directory could contain a SavedModel. Note that -// the method does not load any data by itself. If the method returns `false`, -// the export directory definitely does not contain a SavedModel. If the method -// returns `true`, the export directory may contain a SavedModel but provides no -// guarantee that it can be loaded. +/// Checks whether the provided directory could contain a SavedModel. Note that +/// the method does not load any data by itself. If the method returns `false`, +/// the export directory definitely does not contain a SavedModel. If the method +/// returns `true`, the export directory may contain a SavedModel but provides +/// no guarantee that it can be loaded. bool MaybeSavedModelDirectory(const string& export_dir); } // namespace tensorflow diff --git a/tensorflow/cc/saved_model/signature_constants.h b/tensorflow/cc/saved_model/signature_constants.h index 5a784874cd..b2d39bd55b 100644 --- a/tensorflow/cc/saved_model/signature_constants.h +++ b/tensorflow/cc/saved_model/signature_constants.h @@ -18,48 +18,48 @@ limitations under the License. namespace tensorflow { -// Key in the signature def map for `default` serving signatures. The default -// signature is used in inference requests where a specific signature was not -// specified. +/// Key in the signature def map for `default` serving signatures. The default +/// signature is used in inference requests where a specific signature was not +/// specified. static constexpr char kDefaultServingSignatureDefKey[] = "serving_default"; //////////////////////////////////////////////////////////////////////////////// -// Classification API constants. +/// Classification API constants. -// Classification inputs. +/// Classification inputs. static constexpr char kClassifyInputs[] = "inputs"; -// Classification method name used in a SignatureDef. +/// Classification method name used in a SignatureDef. static constexpr char kClassifyMethodName[] = "tensorflow/serving/classify"; -// Classification classes output. +/// Classification classes output. static constexpr char kClassifyOutputClasses[] = "classes"; -// Classification scores output. +/// Classification scores output. static constexpr char kClassifyOutputScores[] = "scores"; //////////////////////////////////////////////////////////////////////////////// -// Predict API constants. +/// Predict API constants. -// Predict inputs. +/// Predict inputs. static constexpr char kPredictInputs[] = "inputs"; -// Predict method name used in a SignatureDef. +/// Predict method name used in a SignatureDef. static constexpr char kPredictMethodName[] = "tensorflow/serving/predict"; -// Predict outputs. +/// Predict outputs. static constexpr char kPredictOutputs[] = "outputs"; //////////////////////////////////////////////////////////////////////////////// -// Regression API constants. +/// Regression API constants. -// Regression inputs. +/// Regression inputs. static constexpr char kRegressInputs[] = "inputs"; -// Regression method name used in a SignatureDef. +/// Regression method name used in a SignatureDef. static constexpr char kRegressMethodName[] = "tensorflow/serving/regress"; -// Regression outputs. +/// Regression outputs. static constexpr char kRegressOutputs[] = "outputs"; //////////////////////////////////////////////////////////////////////////////// diff --git a/tensorflow/cc/saved_model/tag_constants.h b/tensorflow/cc/saved_model/tag_constants.h index 8c4d12a57f..48ab1158e4 100644 --- a/tensorflow/cc/saved_model/tag_constants.h +++ b/tensorflow/cc/saved_model/tag_constants.h @@ -18,10 +18,10 @@ limitations under the License. namespace tensorflow { -// Tag for the `serving` graph. +/// Tag for the `serving` graph. constexpr char kSavedModelTagServe[] = "serve"; -// Tag for the `training` graph.` +/// Tag for the `training` graph.` constexpr char kSavedModelTagTrain[] = "train"; } // namespace tensorflow |