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# Description: 17# Keras saving and loading libraries. 18load("//tensorflow:tensorflow.bzl", "py_test") 19 20package(default_visibility = ["//tensorflow:__subpackages__"]) 21 22licenses(["notice"]) # Apache 2.0 23 24exports_files(["LICENSE"]) 25 26py_library( 27 name = "model_utils", 28 srcs = ["__init__.py"], 29 srcs_version = "PY2AND3", 30 deps = [ 31 ":export_output", 32 ":export_utils", 33 ":mode_keys", 34 ], 35) 36 37py_library( 38 name = "export_output", 39 srcs = ["export_output.py"], 40 srcs_version = "PY2AND3", 41 deps = [ 42 "//tensorflow/python:constant_op", 43 "//tensorflow/python:dtypes", 44 "//tensorflow/python:framework_ops", 45 "//tensorflow/python/saved_model:signature_def_utils", 46 ], 47) 48 49py_test( 50 name = "export_output_test", 51 srcs = ["export_output_test.py"], 52 srcs_version = "PY2AND3", 53 deps = [ 54 ":export_output", 55 "//tensorflow/core:protos_all_py", 56 "//tensorflow/python:array_ops", 57 "//tensorflow/python:client_testlib", 58 "//tensorflow/python:constant_op", 59 "//tensorflow/python:control_flow_ops", 60 "//tensorflow/python:dtypes", 61 "//tensorflow/python:framework_ops", 62 "//tensorflow/python:sparse_tensor", 63 "//tensorflow/python/keras", 64 "//tensorflow/python/saved_model:signature_constants", 65 ], 66) 67 68py_library( 69 name = "export_utils", 70 srcs = ["export_utils.py"], 71 srcs_version = "PY2AND3", 72 deps = [ 73 ":export_output", 74 ":mode_keys", 75 "//tensorflow/python:platform", 76 "//tensorflow/python:util", 77 "//tensorflow/python/saved_model:signature_constants", 78 "//tensorflow/python/saved_model:signature_def_utils", 79 "//tensorflow/python/saved_model:tag_constants", 80 ], 81) 82 83py_test( 84 name = "export_test", 85 srcs = ["export_test.py"], 86 srcs_version = "PY2AND3", 87 deps = [ 88 ":export_utils", 89 "//tensorflow/python:array_ops", 90 "//tensorflow/python:client_testlib", 91 "//tensorflow/python:constant_op", 92 "//tensorflow/python:control_flow_ops", 93 "//tensorflow/python:dtypes", 94 "//tensorflow/python:framework_ops", 95 "//tensorflow/python:framework_test_lib", 96 "//tensorflow/python:sparse_tensor", 97 "//tensorflow/python/keras", 98 "//tensorflow/python/saved_model:signature_constants", 99 "//tensorflow/python/saved_model:signature_def_utils", 100 ], 101) 102 103py_library( 104 name = "mode_keys", 105 srcs = ["mode_keys.py"], 106 srcs_version = "PY2AND3", 107) 108 109py_test( 110 name = "mode_keys_test", 111 srcs = ["mode_keys_test.py"], 112 srcs_version = "PY2AND3", 113 deps = [ 114 ":mode_keys", 115 "//tensorflow/python:client_testlib", 116 ], 117) 118