Skip to content

Commit ccb7382

Browse files
committed
add bagua-tensorflow and demos
1 parent 7d522b4 commit ccb7382

19 files changed

+3156
-0
lines changed

bagua-tensorflow/binding.gyp

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
'targets': [
3+
{
4+
'target_name': 'tensorflow',
5+
'sources': [
6+
'src/tf.cpp',
7+
'src/tf_graph.cpp',
8+
'src/tf_session.cpp',
9+
'src/tf_tensor.cpp',
10+
'src/tf_datatype.cpp',
11+
'src/opencv.cpp',
12+
],
13+
'include_dirs': [
14+
'<!(node -e "require(\'nan\')")',
15+
'<!(pwd)',
16+
],
17+
'libraries': [
18+
'-L<!(pwd)/tensorflow',
19+
'-ltensorflow-lnx64',
20+
'-lopencv_core -lopencv_highgui -lopencv_imgproc',
21+
'-lm -lstdc++'
22+
],
23+
'cflags_cc': [
24+
'-std=c++11',
25+
'-fexceptions',
26+
'-Wno-ignored-qualifiers'
27+
]
28+
}
29+
]
30+
}

bagua-tensorflow/package.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "tensorflow-js",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"dependencies": {
12+
"nan": "^2.5.0"
13+
}
14+
}

bagua-tensorflow/src/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"use strict";
2+
var tf = require("../build/Release/tensorflow.node");
3+
4+
module.exports = tf;

0 commit comments

Comments
 (0)