1# Description: 2# Contains the Keras preprocessing layers (internal TensorFlow version). 3 4load("//tensorflow:tensorflow.bzl", "tf_py_test") 5 6package( 7 default_visibility = [ 8 "//tensorflow/python/keras:__subpackages__", 9 ], 10 licenses = ["notice"], # Apache 2.0 11) 12 13filegroup( 14 name = "all_py_srcs", 15 srcs = glob(["*.py"]), 16 visibility = ["//tensorflow/python/keras/google/private_tf_api_test:__pkg__"], 17) 18 19py_library( 20 name = "preprocessing", 21 srcs = [ 22 "__init__.py", 23 ], 24 srcs_version = "PY3", 25 deps = [ 26 ":image", 27 ":sequence", 28 ":text", 29 ":timeseries", 30 "//tensorflow/python/keras/utils:all_utils", 31 ], 32) 33 34py_library( 35 name = "image", 36 srcs = [ 37 "dataset_utils.py", 38 "image.py", 39 "image_dataset.py", 40 ], 41 srcs_version = "PY3", 42 deps = [ 43 "//tensorflow/python:util", 44 "//tensorflow/python/keras:backend", 45 "//tensorflow/python/keras/layers/preprocessing:image_preprocessing", 46 "//tensorflow/python/keras/utils:data_utils", 47 ], 48) 49 50py_library( 51 name = "sequence", 52 srcs = [ 53 "sequence.py", 54 ], 55 srcs_version = "PY3", 56 deps = [ 57 "//tensorflow/python:util", 58 "//tensorflow/python/keras/utils:data_utils", 59 ], 60) 61 62py_library( 63 name = "timeseries", 64 srcs = [ 65 "timeseries.py", 66 ], 67 srcs_version = "PY3", 68 deps = [ 69 "//tensorflow/python:array_ops", 70 "//tensorflow/python:math_ops", 71 "//tensorflow/python/data/ops:dataset_ops", 72 "//third_party/py/numpy", 73 ], 74) 75 76py_library( 77 name = "text", 78 srcs = [ 79 "dataset_utils.py", 80 "text.py", 81 "text_dataset.py", 82 ], 83 srcs_version = "PY3", 84 deps = ["//tensorflow/python:util"], 85) 86 87tf_py_test( 88 name = "image_test", 89 size = "medium", 90 srcs = ["image_test.py"], 91 python_version = "PY3", 92 deps = [ 93 ":image", 94 "//tensorflow/python:client_testlib", 95 "//tensorflow/python/keras", 96 "//third_party/py/numpy", 97 ], 98) 99 100tf_py_test( 101 name = "image_dataset_test", 102 size = "small", 103 srcs = ["image_dataset_test.py"], 104 python_version = "PY3", 105 deps = [ 106 ":image", 107 "//tensorflow/python:client_testlib", 108 "//tensorflow/python/compat:v2_compat", 109 "//tensorflow/python/keras", 110 "//third_party/py/numpy", 111 ], 112) 113 114tf_py_test( 115 name = "sequence_test", 116 size = "small", 117 srcs = ["sequence_test.py"], 118 python_version = "PY3", 119 deps = [ 120 ":sequence", 121 "//tensorflow/python:client_testlib", 122 "//third_party/py/numpy", 123 ], 124) 125 126tf_py_test( 127 name = "text_test", 128 size = "small", 129 srcs = ["text_test.py"], 130 python_version = "PY3", 131 deps = [ 132 ":text", 133 "//tensorflow/python:client_testlib", 134 "//third_party/py/numpy", 135 ], 136) 137 138tf_py_test( 139 name = "text_dataset_test", 140 size = "small", 141 srcs = ["text_dataset_test.py"], 142 python_version = "PY3", 143 deps = [ 144 ":text", 145 "//tensorflow/python:client_testlib", 146 "//tensorflow/python/compat:v2_compat", 147 "//tensorflow/python/keras", 148 ], 149) 150 151tf_py_test( 152 name = "timeseries_test", 153 size = "small", 154 srcs = ["timeseries_test.py"], 155 python_version = "PY3", 156 deps = [ 157 ":timeseries", 158 "//tensorflow/python:client_testlib", 159 "//tensorflow/python/compat:v2_compat", 160 "//third_party/py/numpy", 161 ], 162) 163