我一直在关注本教程,以量化iOS图表:https://petewarden.com/2016/05/03/how-to-quantize-neural-networks-with-tensorflow/
我在终端运行:
bazel build tensorflow/tools/quantization:quantize_graph && \
bazel-bin/tensorflow/tools/quantization/quantize_graph \
--input=stripped_graph.pb \
--input_node_names=Mul \
--output_node_names=final_result \
--output=final_output_graph.pb \
--mode=eightbit
但是,它输出的所有内容如下:
INFO: Found 1 target...
Target //tensorflow/tools/quantization:quantize_graph up-to-date:
bazel-bin/tensorflow/tools/quantization/quantize_graph
INFO: Elapsed time: 0.748s, Critical Path: 0.30s
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W 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.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
为什么不完成命令?我的电脑需要GPU吗?
更新
在泊坞窗图像中运行相同的命令会输出以下内容:
ERROR: /tensorflow/tensorflow/core/kernels/BUILD:1315:1: C++ compilation of rule '//tensorflow/core/kernels:matrix_solve_ls_op' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-canonical-system-headers ... (remaining 100 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 4.
gcc: internal compiler error: Killed (program cc1plus)
更新
对于遇到此问题的任何人,只需运行命令即可在不使用docker的情况下量化终端中的图形,可能需要一段时间(我花了大约一个小时),但它应该可以工作,而且不需要GPU。
答案 0 :(得分:0)
没关系,输出只花了一个小时而没有更新。