berthubert / hello-dl Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://berthub.eu/tmp/hello-dl
License: MIT License
Home Page: https://berthub.eu/tmp/hello-dl
License: MIT License
Given your call for portability testing, I tried to build this on NetBSD. After cmake failing because of eigen3 not being present (fair enough - I didn't read the build instructions :-) I installed version 3.3.9 via pkgsrc which put it in /usr/pkg. Then, cmake found it (likely via pkg-config, which has /usr/pkg/lib/pkgconfig in the default path), but apparently did not add the --cflags to the build, resulting in
[ 2%] Building CXX object CMakeFiles/common.dir/mnistreader.cc.o
In file included from /home/gdt/SOFTWARE/AI/hello-dl/mnistreader.hh:8:0,
from /home/gdt/SOFTWARE/AI/hello-dl/mnistreader.cc:1:
/home/gdt/SOFTWARE/AI/hello-dl/tensor2.hh:10:10: fatal error: Eigen/Dense: No such file or directory
#include <Eigen/Dense>
^~~~~~~~~~~~~
compilation terminated.
*** Error code 1
pkg-config seems ok:
$ pkg-config --cflags eigen3
-I/usr/pkg/include/eigen3
Perhaps this is an issue in eigen3's cmake support.
Output from building on macOS:
[ 2%] Building CXX object CMakeFiles/common.dir/mnistreader.cc.o
[ 4%] Building CXX object CMakeFiles/common.dir/textsupport.cc.o
clang: clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]warning:
clang: warning: argument unused during compilation: '-mavx' [-Wunused-command-line-argument]
argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: clangwarning: : warning: argument unused during compilation: '-mavx' [-Wunused-command-line-argument]
argument unused during compilation: '-mavx2' [-Wunused-command-line-argument]clang:
clangwarning: : argument unused during compilation: '-mavx2' [-Wunused-command-line-argument]warning:
clang: warning: argument unused during compilation: '-mfma' [-Wunused-command-line-argument]
argument unused during compilation: '-mfma' [-Wunused-command-line-argument]
[ 4%] Built target common
[ 14%] Building CXX object CMakeFiles/tensor-convo.dir/tensor-convo.cc.o
[ 14%] Building CXX object CMakeFiles/img-ocr.dir/img-ocr.cc.o
[ 14%] Building CXX object CMakeFiles/tensor-convo-par.dir/tensor-convo-par.cc.o
[ 14%] Building CXX object CMakeFiles/tensor-relu.dir/tensor-relu.cc.o
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mavx' [-Wunused-command-line-argument]
clang: clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clangwarning: : warning: argument unused during compilation: '-mavx' [-Wunused-command-line-argument]
argument unused during compilation: '-mavx2' [-Wunused-command-line-argument]
clang: clang: clangwarning: warning: : warning: argument unused during compilation: '-mfma' [-Wunused-command-line-argument]argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: argument unused during compilation: '-mavx2' [-Wunused-command-line-argument]warning:
argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mavx' [-Wunused-command-line-argument]
clang: warning: clang: argument unused during compilation: '-mavx2' [-Wunused-command-line-argument]warning:
argument unused during compilation: '-mfma' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mavx' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mavx2' [-Wunused-command-line-argument]
clang: warning: clang: warning: argument unused during compilation: '-mfma' [-Wunused-command-line-argument]
argument unused during compilation: '-mfma' [-Wunused-command-line-argument]
/Users/hvanderschuur/Projects/dev/hello-dl/img-ocr.cc:39:27: warning: lambda capture 'rows' is not used [-Wunused-lambda-capture]
auto getintens=[&data, &rows, &cols](int c, int r) {
~~~^~~~
/Users/hvanderschuur/Projects/dev/hello-dl/tensor-relu.cc:90:3: error: use of undeclared identifier 'feenableexcept'; did you mean 'feraiseexcept'?
feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
^~~~~~~~~~~~~~
feraiseexcept
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/fenv.h:299:12: note: 'feraiseexcept' declared here
extern int feraiseexcept(int /* excepts */);
^
/Users/hvanderschuur/Projects/dev/hello-dl/tensor-convo.cc:67:3: error: use of undeclared identifier 'feenableexcept'; did you mean 'feraiseexcept'?
feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
^~~~~~~~~~~~~~
feraiseexcept
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/fenv.h:299:12: note: 'feraiseexcept' declared here
extern int feraiseexcept(int /* excepts */);
^
1 error generated.
make[2]: *** [CMakeFiles/tensor-relu.dir/tensor-relu.cc.o] Error 1
make[1]: *** [CMakeFiles/tensor-relu.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [CMakeFiles/tensor-convo.dir/tensor-convo.cc.o] Error 1
make[1]: *** [CMakeFiles/tensor-convo.dir/all] Error 2
[ 17%] Building CXX object CMakeFiles/tensor-convo-par.dir/ext/sqlitewriter/sqlwriter.cc.o
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mavx' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mavx2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mfma' [-Wunused-command-line-argument]
[ 19%] Building CXX object CMakeFiles/img-ocr.dir/vizi.cc.o
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mavx' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mavx2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-mfma' [-Wunused-command-line-argument]
In file included from /Users/hvanderschuur/Projects/dev/hello-dl/vizi.cc:7:
/Users/hvanderschuur/Projects/dev/hello-dl/ext/stb/stb_image_write.h:776:13: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
len = sprintf(buffer, "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
/Users/hvanderschuur/Projects/dev/hello-dl/vizi.cc:66:22: warning: lambda capture 'out' is not used [-Wunused-lambda-capture]
auto box = [&pix, &out](int col, int row, int w, int h, uint8_t cr, uint8_t cg, uint8_t cb) {
~~~^~~
1 warning generated.
2 warnings generated.
[ 21%] Linking CXX executable img-ocr
[ 21%] Built target img-ocr
[ 24%] Linking CXX executable tensor-convo-par
[ 24%] Built target tensor-convo-par
make: *** [all] Error 2
Found some articles that seem to provide a solution… unfortunately, I lack the skills to apply it :-)
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.