我已经通过安装TensorFlow virtualenv。而且效果很好。
现在,我想使用C ++加载模型并进行预测。但是由于protobuf版本不匹配,我无法编译程序。错误类似:
tensorflow/core/framework/device_attributes.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
tensorflow/core/framework/device_attributes.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
tensorflow/core/framework/device_attributes.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
Run Code Online (Sandbox Code Playgroud)
在virtualenv中:
$ pip show protobuf …Run Code Online (Sandbox Code Playgroud)