forked from tensorflow/tfjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GL reference in headless WebGL test code. (tensorflow#1832)
* Fix GL reference in headless WebGL test code. * Cleanup & README
- Loading branch information
Showing
2 changed files
with
48 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# MobileNet tfjs-backend-nodegl Demo | ||
|
||
*This is a very early demo to show how tfjs-backend-nodegl can be used for headless WebGL acceleration.* | ||
|
||
To run this demo, perform the following: | ||
|
||
1. Move into `tfjs-backend-nodegl` (parent directory of this demo folder): | ||
```sh | ||
$ cd tfjs-backend-nodegl | ||
``` | ||
|
||
2. Build package and compile TypeScript: | ||
```sh | ||
$ yarn && yarn tsc | ||
``` | ||
|
||
3. Move into the demo directory: | ||
```sh | ||
$ cd demo | ||
``` | ||
|
||
4. Prep and build demo: | ||
```sh | ||
$ yarn | ||
``` | ||
|
||
5. Run demo: | ||
```sh | ||
$ node run_mobilenet_inference.js dog.jpg | ||
``` | ||
|
||
Expected output: | ||
```sh | ||
$ node run_mobilenet_inference.js dog.jpg | ||
Platform node has already been set. Overwriting the platform with [object Object]. | ||
- gl.VERSION: OpenGL ES 3.0 (ANGLE 2.1.0.9512a0ef062a) | ||
- gl.RENDERER: ANGLE (Intel Inc., Intel(R) Iris(TM) Plus Graphics 640, OpenGL 4.1 core) | ||
- Loading model... | ||
- Mobilenet load: 6450.763924002647ms | ||
- Coldstarting model... | ||
- Mobilenet cold start: 297.92842200398445ms | ||
- Running inference (100x) ... | ||
- Mobilenet inference: (100x) : 35.75772546708584ms | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters