Hi, I'm running into an issue with set_device_type. Any ideas please?
[ 7%] Building CXX object CMakeFiles/caffe2_cpp.dir/src/caffe2/util/model.cc.o
/home/tliu/Dev/caffe2_cpp_tutorial/src/caffe2/util/model.cc: In member function ‘void caffe2::ModelUtil::AddIterOps()’:
/home/tliu/Dev/caffe2_cpp_tutorial/src/caffe2/util/model.cc:81:28: error: no matching function for call to ‘caffe2::DeviceOption::set_device_type(const DeviceType&)’
->set_device_type(CPU);
^
In file included from /usr/include/caffe2/proto/caffe2_pb.h:4:0,
from /usr/include/caffe2/core/context_base.h:7,
from /usr/include/caffe2/core/context.h:10,
from /usr/include/caffe2/core/storage.h:14,
from /usr/include/caffe2/core/tensor.h:4,
from /usr/include/caffe2/core/blob.h:14,
from /usr/include/caffe2/core/net.h:13,
from /home/tliu/Dev/caffe2_cpp_tutorial/src/caffe2/util/external.pb.h:6,
from /home/tliu/Dev/caffe2_cpp_tutorial/src/caffe2/util/model.pb.h:34,
from /home/tliu/Dev/caffe2_cpp_tutorial/src/caffe2/util/model.cc:1:
/usr/include/caffe2/proto/caffe2.pb.h:4289:13: note: candidate: void caffe2::DeviceOption::set_device_type(google::protobuf::int32)
inline void DeviceOption::set_device_type(::google::protobuf::int32 value) {
^
/usr/include/caffe2/proto/caffe2.pb.h:4289:13: note: no known conversion for argument 1 from ‘const DeviceType {aka const at::DeviceType}’ to ‘google::protobuf::int32 {aka int}’
Hi, I'm running into an issue with set_device_type. Any ideas please?
[ 7%] Building CXX object CMakeFiles/caffe2_cpp.dir/src/caffe2/util/model.cc.o /home/tliu/Dev/caffe2_cpp_tutorial/src/caffe2/util/model.cc: In member function ‘void caffe2::ModelUtil::AddIterOps()’: /home/tliu/Dev/caffe2_cpp_tutorial/src/caffe2/util/model.cc:81:28: error: no matching function for call to ‘caffe2::DeviceOption::set_device_type(const DeviceType&)’ ->set_device_type(CPU); ^ In file included from /usr/include/caffe2/proto/caffe2_pb.h:4:0, from /usr/include/caffe2/core/context_base.h:7, from /usr/include/caffe2/core/context.h:10, from /usr/include/caffe2/core/storage.h:14, from /usr/include/caffe2/core/tensor.h:4, from /usr/include/caffe2/core/blob.h:14, from /usr/include/caffe2/core/net.h:13, from /home/tliu/Dev/caffe2_cpp_tutorial/src/caffe2/util/external.pb.h:6, from /home/tliu/Dev/caffe2_cpp_tutorial/src/caffe2/util/model.pb.h:34, from /home/tliu/Dev/caffe2_cpp_tutorial/src/caffe2/util/model.cc:1: /usr/include/caffe2/proto/caffe2.pb.h:4289:13: note: candidate: void caffe2::DeviceOption::set_device_type(google::protobuf::int32) inline void DeviceOption::set_device_type(::google::protobuf::int32 value) { ^ /usr/include/caffe2/proto/caffe2.pb.h:4289:13: note: no known conversion for argument 1 from ‘const DeviceType {aka const at::DeviceType}’ to ‘google::protobuf::int32 {aka int}’