1 # Description: 2 # Contains kernel methods for TensorFlow. 3 4 licenses(["notice"]) # Apache 2.0 5 6 exports_files(["LICENSE"]) 7 8 package(default_visibility = ["//tensorflow:__subpackages__"]) 9 10 load("//tensorflow:tensorflow.bzl", "py_test") 11 12 py_library( 13 name = "kernel_methods", 14 srcs = [ 15 "__init__.py", 16 "python/kernel_estimators.py", 17 "python/losses.py", 18 "python/mappers/random_fourier_features.py", 19 ], 20 srcs_version = "PY2AND3", 21 deps = [ 22 ":dense_kernel_mapper_py", 23 "//tensorflow/contrib/layers:layers_py", 24 "//tensorflow/contrib/learn", 25 "//tensorflow/python:array_ops", 26 "//tensorflow/python:check_ops", 27 "//tensorflow/python:constant_op", 28 "//tensorflow/python:dtypes", 29 "//tensorflow/python:framework_ops", 30 "//tensorflow/python:math_ops", 31 "//tensorflow/python:nn_ops", 32 "//tensorflow/python:platform", 33 "//tensorflow/python:util", 34 "//tensorflow/python/ops/losses", 35 "//third_party/py/numpy", 36 "@six_archive//:six", 37 ], 38 ) 39 40 py_library( 41 name = "dense_kernel_mapper_py", 42 srcs = ["python/mappers/dense_kernel_mapper.py"], 43 srcs_version = "PY2AND3", 44 deps = ["@six_archive//:six"], 45 ) 46 47 py_test( 48 name = "random_fourier_features_test", 49 srcs = ["python/mappers/random_fourier_features_test.py"], 50 srcs_version = "PY2AND3", 51 deps = [ 52 ":dense_kernel_mapper_py", 53 ":kernel_methods", 54 "//tensorflow/python:framework_for_generated_wrappers", 55 "//tensorflow/python:framework_test_lib", 56 "//tensorflow/python:math_ops", 57 "//tensorflow/python:nn", 58 "//tensorflow/python:platform_test", 59 "//tensorflow/python:random_ops", 60 ], 61 ) 62 63 py_test( 64 name = "kernel_estimators_test", 65 srcs = ["python/kernel_estimators_test.py"], 66 srcs_version = "PY2AND3", 67 tags = ["notsan"], 68 deps = [ 69 ":kernel_methods", 70 "//tensorflow/contrib/layers:layers_py", 71 "//tensorflow/contrib/learn", 72 "//tensorflow/python:framework_for_generated_wrappers", 73 "//tensorflow/python:framework_test_lib", 74 "//tensorflow/python:platform_test", 75 "//tensorflow/python:sparse_tensor", 76 "//third_party/py/numpy", 77 ], 78 ) 79 80 py_test( 81 name = "losses_test", 82 srcs = ["python/losses_test.py"], 83 srcs_version = "PY2AND3", 84 deps = [ 85 ":kernel_methods", 86 "//tensorflow/python:array_ops", 87 "//tensorflow/python:client_testlib", 88 "//tensorflow/python:errors", 89 "//tensorflow/python:framework_for_generated_wrappers", 90 "//third_party/py/numpy", 91 ], 92 ) 93 94 filegroup( 95 name = "all_files", 96 srcs = glob( 97 ["**/*"], 98 exclude = [ 99 "**/METADATA", 100 "**/OWNERS", 101 ], 102 ), 103 visibility = ["//tensorflow:__subpackages__"], 104 ) 105