Build Tensorflow变换图不';没有量化权重
我正在使用git在Windows Server 2012 R2上构建Tensorflow。当我构建目标Build Tensorflow变换图不';没有量化权重,build,tensorflow,object-detection,Build,Tensorflow,Object Detection,我正在使用git在Windows Server 2012 R2上构建Tensorflow。当我构建目标tensorflow/tools/graph\u transforms:transform\u graph时,它构建正确,但是量化权重转换不可用。这是运行变换图的输出: $ bazel-bin/tensorflow/tools/graph_transforms/transform_graph --in_graph=/c/Users/name/git-repos/project/input/fil
tensorflow/tools/graph\u transforms:transform\u graph
时,它构建正确,但是量化权重
转换不可用。这是运行变换图的输出:
$ bazel-bin/tensorflow/tools/graph_transforms/transform_graph --in_graph=/c/Users/name/git-repos/project/input/file.pb --out_graph=/c/Users/name/git-repos/project/input/file_q.pb --inputs='image_tensor' --outputs='detection_boxes,detection_scores,detection_classes' --transforms='fold_constants(ignore_error=true)
fold_batch_norms
fold_old_batch_norms
quantize_weights'
2017-07-06 13:21:10.361492: I C:\tools\msys64\tmp\_bazel_name\avtc4yfu\execroot\tensorflow\tensorflow\tools\graph_transforms\transform_graph.cc:263] Applying fold_constants
2017-07-06 13:21:10.476001: W C:\tools\msys64\tmp\_bazel_name\avtc4yfu\execroot\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-07-06 13:21:13.241688: I C:\tools\msys64\tmp\_bazel_name\avtc4yfu\execroot\tensorflow\tensorflow\tools\graph_transforms\transform_graph.cc:263] Applying fold_batch_norms
2017-07-06 13:21:16.088969: I C:\tools\msys64\tmp\_bazel_name\avtc4yfu\execroot\tensorflow\tensorflow\tools\graph_transforms\transform_graph.cc:263] Applying fold_old_batch_norms
2017-07-06 13:21:16.650913: E C:\tools\msys64\tmp\_bazel_name\avtc4yfu\execroot\tensorflow\tensorflow\tools\graph_transforms\transform_graph.cc:209] Transform 'quantize_weights' not recognized.
2017-07-06 13:21:16.650934: E C:\tools\msys64\tmp\_bazel_name\avtc4yfu\execroot\tensorflow\tensorflow\tools\graph_transforms\transform_graph.cc:210] usage: C:\Users\name\git-repos\tensorflow\bazel-bin\tensorflow\tools\graph_transforms\transform_graph.exe
Flags:
--in_graph="" string input graph file name
--out_graph="" string output graph file name
--inputs="" string inputs
--outputs="" string outputs
--transforms="" string list of transforms
--output_as_text=false bool whether to write the graph in text protobuf format
Transforms are:
add_default_attributes
backport_concatv2
backport_tensor_array_v3
fold_batch_norms
fold_constants
fold_old_batch_norms
freeze_requantization_ranges
fuse_pad_and_conv
fuse_resize_and_conv
fuse_resize_pad_and_conv
insert_logging
obfuscate_names
remove_attribute
remove_device
remove_nodes
rename_attribute
rename_op
set_device
sort_by_execution_order
sparsify_gather
strip_unused_nodes
为什么不是所有的转换都可用?我也尝试过用bazel clean进行重建。不幸的是,我认为这是TensorFlow的Windows版本的问题。编译TF的量化部分所依赖的库时存在问题,因此在cmake中禁用依赖它们的任何内容(如quantize_权重)。值得在上对此提出一个bug。不过,OP似乎是在装有bazel的Windows上编译的(!),这些限制也适用吗?这是tensorflow中现在的问题。