前言在进行部署TensorFlow Serving环境过程中，总是报错(如下错误信息)，刚开始以为是服务器没有启动，后来才发现是代理问题<_Rendezvous of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "Socket closed" debug_error_string = "{"created":"@1545792723.752821509","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1036,"grpc_message":"Socket closed","grpc_status":14}" > [...]
[常见错误] Caffe编译报错undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8'
前言在编译caffe过程中一直出现错误undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8'，找了很久没找到错误，最终通过升级编译器解决了。解决方法升级编译器$ yum install centos-release-scl -y $ yum install devtoolset-3-toolchain -y $ scl enable devtoolset-3 bash $ gcc --version 重新编译，搞定！参考：https://blog.csdn.net/lanwilliam/article/details/77893033
前言在做TensorFlow模型量化过程中，会用到transform_graph，然后在进行模型压缩时候因为自己的模型有1.7GB，所以程序报错。[libprotobuf ERROR external/protobuf_archive/src/google/protobuf/io/coded_stream.cc:190] A protocol message was rejected because it was too big (more than 1073741824 bytes). To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.解决办法修改代码$ vim tensorflow/core/platform/env.cc 找到coded_stream.SetTotalBytesLimit(1024LL << 20, 512LL << 20);coded_stream.SetTotalBytesLimit(INT_MAX, INT_MAX);然后修改参数即可重新编译$ bazel build tensorflow/tools/graph_transforms:transform_graph
[常见错误] caffe跑resnet50 imagenet数据集错误height <= datum_height
height <= datum_height原因下载了imagenet数据集后，使用数据集中验证集验证resnet50准确率出现如下错误：height <= datum_height（224 vs 170）出现这个问题的原因是验证图片数据集（LMDB）的图片的size小于需要裁剪的尺寸。[...]
[常见错误]使用bazel 编译tensorflow serving时报错：fatal error: stropts.h: No such file or directory
背景：公司一个model需要用到老版本的TensorFlow with MKLDNN。TensorFlow版本：1.4Bazel版本：0.5.4错误详情使用bazel 编译tensorflow serving时报错：fatal error: stropts.h: No such file or directory即：ERROR: /root/.cache/bazel/_bazel_root/9d2529a5716c088bd9c07f1c8e164988/external/curl/BUILD:28:1: C++ compilation of rule '@curl//:curl' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -MD -MF ... (remaining 50 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.external/curl/lib/if2ip.c:47:23: fatal error: stropts.h: No such file or directory # include <stropts.h> ^ 出现这个问题一般是在centos 操作系统上，Ubuntu上默认是有这个文件的。 头文件stropts.h是POSIX XSR的一部分，因为linux不支持STREAMS，所以缺少这个文件。解决办法在/usr/include目录下创建一个空的stropts.h文件即可。