2017-07-06 6 views
0

gitからWindows Server 2012 R2にTensorflowをビルドしています。ターゲットtensorflow/tools/graph_transforms:transform_graphをビルドすると、正しくビルドされますが、quantize_weightsトランスフォームは使用できません。Tensorflow transform_graphにquantize_weightsがありません

$ 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 

なぜ、すべての変換が用意されています。これは、transform_graphを実行しているの出力ですか?私もbazel cleanで再構築しようとしました。

答えて

0

残念ながら、これはTensorFlowのWindowsビルドに関する問題だと思います。 https://github.com/google/gemmlowpライブラリをコンパイルするときに、TFの量子化部分が依存するため、quantake_weightsに頼るものはすべてcmakeでは無効になります。これについてバグを提出する価値がありますhttps://github.com/tensorflow/tensorflow/issues

+0

WindowsでbazelでOPがコンパイルされているようですが(!)、これらの制限も適用されますか? – user1735003

+0

これはテンソルフローで#[11351](https://github.com/tensorflow/tensorflow/issues/11351)になりました。 – user2397854

関連する問題