zacario-li / caffe2_cpp_example Goto Github PK
View Code? Open in Web Editor NEWc++ caffe2 example
License: MIT License
c++ caffe2 example
License: MIT License
I just clone your repository and compile it, and got the following error :
The Caffe2 is build with the last pytorch github commit.
> make -j8
Scanning dependencies of target caffe2_cpp_test
[ 50%] Building CXX object CMakeFiles/caffe2_cpp_test.dir/src/main.cpp.o
/home/cgilab/Desktop/Caffe2_Demo/03_cpp_forward/build/caffe2_Cpp_example/src/main.cpp: In function ‘void caffe2::caffe2_pretrained_run()’:
/home/cgilab/Desktop/Caffe2_Demo/03_cpp_forward/build/caffe2_Cpp_example/src/main.cpp:121:50: error: use of deleted function ‘caffe2::Tensor::Tensor(const caffe2::Tensor&)’
auto output = TensorCPU(output_device);
^
In file included from /usr/local/include/caffe2/core/blob.h:13:0,
from /usr/local/include/caffe2/core/operator.h:12,
from /home/cgilab/Desktop/Caffe2_Demo/03_cpp_forward/build/caffe2_Cpp_example/inc/utils.h:10,
from /home/cgilab/Desktop/Caffe2_Demo/03_cpp_forward/build/caffe2_Cpp_example/src/main.cpp:1:
/usr/local/include/caffe2/core/tensor.h:763:3: note: declared here
Tensor(const Tensor& src) = delete;
^
In file included from /usr/local/include/caffe2/core/operator.h:12:0,
from /home/cgilab/Desktop/Caffe2_Demo/03_cpp_forward/build/caffe2_Cpp_example/inc/utils.h:10,
from /home/cgilab/Desktop/Caffe2_Demo/03_cpp_forward/build/caffe2_Cpp_example/src/main.cpp:1:
/usr/local/include/caffe2/core/blob.h: In instantiation of ‘T* caffe2::Blob::GetMutable() [with T = caffe2::Tensor]’:
/home/cgilab/Desktop/Caffe2_Demo/03_cpp_forward/build/caffe2_Cpp_example/src/main.cpp:77:75: required from here
/usr/local/include/caffe2/core/blob.h:127:5: error: static assertion failed: GetMutable can't be called with non-default-constructible types. Try using specialized methods
static_assert(
^
/usr/local/include/caffe2/core/blob.h:135:22: error: use of deleted function ‘caffe2::Tensor::Tensor()’
return Reset<T>(new T());
^
In file included from /usr/local/include/caffe2/core/blob.h:13:0,
from /usr/local/include/caffe2/core/operator.h:12,
from /home/cgilab/Desktop/Caffe2_Demo/03_cpp_forward/build/caffe2_Cpp_example/inc/utils.h:10,
from /home/cgilab/Desktop/Caffe2_Demo/03_cpp_forward/build/caffe2_Cpp_example/src/main.cpp:1:
/usr/local/include/caffe2/core/tensor.h:94:3: note: declared here
Tensor() = delete;
^
CMakeFiles/caffe2_cpp_test.dir/build.make:62: recipe for target 'CMakeFiles/caffe2_cpp_test.dir/src/main.cpp.o' failed
make[2]: *** [CMakeFiles/caffe2_cpp_test.dir/src/main.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/caffe2_cpp_test.dir/all' failed
make[1]: *** [CMakeFiles/caffe2_cpp_test.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.