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"""Common tags used for graphs in SavedModel. 16 17""" 18from __future__ import absolute_import 19from __future__ import division 20from __future__ import print_function 21 22from tensorflow.python.util.tf_export import tf_export 23 24 25# Tag for the `serving` graph. 26SERVING = "serve" 27tf_export( 28 "saved_model.SERVING", 29 v1=["saved_model.SERVING", 30 "saved_model.tag_constants.SERVING"]).export_constant( 31 __name__, "SERVING") 32 33# Tag for the `training` graph. 34TRAINING = "train" 35tf_export( 36 "saved_model.TRAINING", 37 v1=["saved_model.TRAINING", 38 "saved_model.tag_constants.TRAINING"]).export_constant( 39 __name__, "TRAINING") 40 41# Tag for the `eval` graph. Not exported while the export logic is in contrib. 42EVAL = "eval" 43 44# Tag for the `gpu` graph. 45GPU = "gpu" 46tf_export( 47 "saved_model.GPU", v1=["saved_model.GPU", 48 "saved_model.tag_constants.GPU"]).export_constant( 49 __name__, "GPU") 50 51# Tag for the `tpu` graph. 52TPU = "tpu" 53tf_export( 54 "saved_model.TPU", v1=["saved_model.TPU", 55 "saved_model.tag_constants.TPU"]).export_constant( 56 __name__, "TPU") 57