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. 18 19# buildifier: disable=same-origin-load 20load("//tensorflow:tensorflow.bzl", "py_strict_library") 21 22# buildifier: disable=same-origin-load 23load("//tensorflow:tensorflow.bzl", "py_strict_test") 24 25package( 26 default_visibility = ["//tensorflow:__subpackages__"], 27 licenses = ["notice"], 28) 29 30py_strict_library( 31 name = "model_utils", 32 srcs = ["__init__.py"], 33 srcs_version = "PY3", 34 deps = [ 35 ":export_output", 36 ":export_utils", 37 ":mode_keys", 38 ], 39) 40 41py_strict_library( 42 name = "export_output", 43 srcs = ["export_output.py"], 44 srcs_version = "PY3", 45 deps = [ 46 "//tensorflow/python:constant_op", 47 "//tensorflow/python:dtypes", 48 "//tensorflow/python:framework_ops", 49 "//tensorflow/python:tensor_util", 50 "//tensorflow/python/saved_model:signature_def_utils", 51 "@six_archive//:six", 52 ], 53) 54 55py_strict_test( 56 name = "export_output_test", 57 srcs = ["export_output_test.py"], 58 python_version = "PY3", 59 srcs_version = "PY3", 60 deps = [ 61 ":export_output", 62 "//tensorflow/core:protos_all_py", 63 "//tensorflow/python:array_ops", 64 "//tensorflow/python:client_testlib", 65 "//tensorflow/python:constant_op", 66 "//tensorflow/python:control_flow_ops", 67 "//tensorflow/python:dtypes", 68 "//tensorflow/python:framework_ops", 69 "//tensorflow/python:metrics", 70 "//tensorflow/python:sparse_tensor", 71 "//tensorflow/python:variables", 72 "//tensorflow/python/eager:context", 73 "//tensorflow/python/saved_model:signature_constants", 74 ], 75) 76 77py_strict_library( 78 name = "export_utils", 79 srcs = ["export_utils.py"], 80 srcs_version = "PY3", 81 deps = [ 82 ":export_output", 83 ":mode_keys", 84 "//tensorflow/python:platform", 85 "//tensorflow/python:util", 86 "//tensorflow/python/saved_model:signature_constants", 87 "//tensorflow/python/saved_model:signature_def_utils", 88 "//tensorflow/python/saved_model:tag_constants", 89 "@six_archive//:six", 90 ], 91) 92 93py_strict_test( 94 name = "export_test", 95 srcs = ["export_test.py"], 96 python_version = "PY3", 97 srcs_version = "PY3", 98 deps = [ 99 ":export_output", 100 ":export_utils", 101 ":mode_keys", 102 "//tensorflow/python:array_ops", 103 "//tensorflow/python:client_testlib", 104 "//tensorflow/python:constant_op", 105 "//tensorflow/python:dtypes", 106 "//tensorflow/python:framework_ops", 107 "//tensorflow/python:framework_test_lib", 108 "//tensorflow/python/saved_model:signature_constants", 109 "//tensorflow/python/saved_model:signature_def_utils", 110 ], 111) 112 113py_strict_library( 114 name = "mode_keys", 115 srcs = ["mode_keys.py"], 116 srcs_version = "PY3", 117 deps = ["//tensorflow/python:util"], 118) 119 120py_strict_test( 121 name = "mode_keys_test", 122 srcs = ["mode_keys_test.py"], 123 python_version = "PY3", 124 srcs_version = "PY3", 125 deps = [ 126 ":mode_keys", 127 "//tensorflow/python:client_testlib", 128 ], 129) 130