This repository was archived by the owner on Jun 4, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed
Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change 1- const os = require ( 'os' ) ;
2-
3- const onnxjs = require ( 'onnxjs' ) ;
1+ import * as os from 'os' ;
2+ import * as onnxjs from 'onnxjs' ;
43
54// check if Node.js
65if ( typeof process !== 'undefined' && process && process . release && process . release . name === 'node' ) {
@@ -19,14 +18,8 @@ if (typeof process !== 'undefined' && process && process.release && process.rele
1918 throw new Error ( `onnxruntime node binding does not support non little-endian platform` ) ;
2019 }
2120
22- onnxjs . InferenceSession = require ( './lib/inference-session-override' ) . OnnxRuntimeInferenceSession ;
21+ // force re-assign overwritten property 'InferenceSession'
22+ ( onnxjs as any ) . InferenceSession = require ( './inference-session-override' ) . OnnxRuntimeInferenceSession ;
2323}
2424
25- // Work items for future:
26- //
27- // 0 - fix memory leak for inference result (output OrtValue) - DONE
28- // 1 - support other tensor types (currently only support float32) - DONE
29- // 2 - typescript type declaration - DONE
30- // 3 - integration with ONNX.js - DONE
31- // 4 - refine API (a javascript wrapper on native module) - DONE
32- // 5 - publish npm module
25+ export = onnxjs ;
Original file line number Diff line number Diff line change 33 "description" : " " ,
44 "version" : " 0.0.1" ,
55 "author" : " fs-eire" ,
6- "main" : " index.js" ,
6+ "main" : " ./lib/ index.js" ,
77 "scripts" : {
88 "install" : " node-pre-gyp install --fallback-to-build=false || npm run build" ,
99 "build" : " tsc && node ./scripts/build" ,
You can’t perform that action at this time.
0 commit comments