1 # Description: 2 # Utility for applying the Graph Transform tool to a MetaGraphDef. 3 4 package(default_visibility = ["//visibility:public"]) 5 6 licenses(["notice"]) # Apache 2.0 7 8 exports_files(["LICENSE"]) 9 10 load( 11 "//tensorflow:tensorflow.bzl", 12 "py_test", 13 ) 14 15 py_library( 16 name = "meta_graph_transform", 17 srcs = [ 18 "__init__.py", 19 "meta_graph_transform.py", 20 ], 21 srcs_version = "PY2AND3", 22 deps = [ 23 "//tensorflow/core:protos_all_py", 24 "//tensorflow/python:framework", 25 "//tensorflow/python:framework_ops", 26 "//tensorflow/python:graph_util", 27 "//tensorflow/python:session", 28 "//tensorflow/python:training", 29 "//tensorflow/python:util", 30 "//tensorflow/python/saved_model:constants", 31 "//tensorflow/tools/graph_transforms:transform_graph_py", 32 ], 33 ) 34 35 py_test( 36 name = "meta_graph_transform_test", 37 size = "small", 38 srcs = ["meta_graph_transform_test.py"], 39 srcs_version = "PY2AND3", 40 visibility = ["//visibility:private"], 41 deps = [ 42 ":meta_graph_transform", 43 "//tensorflow/core:protos_all_py", 44 "//tensorflow/python:array_ops", 45 "//tensorflow/python:client_testlib", 46 "//tensorflow/python:dtypes", 47 "//tensorflow/python:framework_ops", 48 "//tensorflow/python:session", 49 "//tensorflow/python:training", 50 "//tensorflow/python:util", 51 "//tensorflow/python/saved_model:constants", 52 "//tensorflow/tools/graph_transforms:transform_graph_py", 53 ], 54 ) 55 56 filegroup( 57 name = "py_srcs", 58 data = glob([ 59 "**/*.py", 60 ]), 61 ) 62 63 filegroup( 64 name = "all_files", 65 srcs = glob( 66 ["**/*"], 67 exclude = [ 68 "**/METADATA", 69 "**/OWNERS", 70 ], 71 ), 72 visibility = ["//tensorflow:__subpackages__"], 73 ) 74