1 /* Copyright 2016 The TensorFlow Authors. All Rights Reserved. 2 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 ==============================================================================*/ 15 16 #ifndef TENSORFLOW_CC_SAVED_MODEL_CONSTANTS_H_ 17 #define TENSORFLOW_CC_SAVED_MODEL_CONSTANTS_H_ 18 19 namespace tensorflow { 20 21 // SavedModel assets directory. 22 constexpr char kSavedModelAssetsDirectory[] = "assets"; 23 24 // SavedModel assets.extra directory. 25 constexpr char kSavedModelAssetsExtraDirectory[] = "assets.extra"; 26 27 // SavedModel assets key for graph collection-def. 28 constexpr char kSavedModelAssetsKey[] = "saved_model_assets"; 29 30 /// SavedModel legacy init op collection key. Used in v1 SavedModels. 31 constexpr char kSavedModelLegacyInitOpKey[] = "legacy_init_op"; 32 33 /// SavedModel main op collection key. Used in v1 SavedModels. 34 constexpr char kSavedModelMainOpKey[] = "saved_model_main_op"; 35 36 // CollectionDef key for the SavedModel train op. 37 // Not exported while export_all_saved_models is experimental. 38 constexpr char kSavedModelTrainOpKey[] = "saved_model_train_op"; 39 40 // Schema version for SavedModel. 41 constexpr int kSavedModelSchemaVersion = 1; 42 43 // SavedModel proto filename. 44 constexpr char kSavedModelFilenamePb[] = "saved_model.pb"; 45 46 // SavedModel text format proto filename. 47 constexpr char kSavedModelFilenamePbTxt[] = "saved_model.pbtxt"; 48 49 // Subdirectory where debugging related files are written. 50 constexpr char kSavedModelDebugDirectory[] = "debug"; 51 52 // File name for GraphDebugInfo protocol buffer which corresponds to the 53 // SavedModel. 54 constexpr char kSavedModelDebugInfoFilenamePb[] = "saved_model_debug_info.pb"; 55 56 // Directory in which to save the SavedModel variables. 57 constexpr char kSavedModelVariablesDirectory[] = "variables"; 58 59 // SavedModel variables filename. 60 constexpr char kSavedModelVariablesFilename[] = "variables"; 61 62 // SavedModel SignatureDef keys for the initialization and train ops. Used in 63 // V2 SavedModels. 64 constexpr char kSavedModelInitOpSignatureKey[] = "__saved_model_init_op"; 65 constexpr char kSavedModelTrainOpSignatureKey[] = "__saved_model_train_op"; 66 67 // Key in the TensorBundle for the object graph proto. 68 constexpr char kObjectGraphProtoKey[] = "_CHECKPOINTABLE_OBJECT_GRAPH"; 69 70 // Filename for the FingerprintDef protocol buffer. 71 constexpr char kFingerprintFilenamePb[] = "saved_model_fingerprint.pb"; 72 73 } // namespace tensorflow 74 75 #endif // TENSORFLOW_CC_SAVED_MODEL_CONSTANTS_H_ 76