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