From 7a41c1d3a501c4684ea63501e18e6dc7ddc8525b Mon Sep 17 00:00:00 2001 From: meeki007 Date: Wed, 2 Dec 2020 14:34:43 -0500 Subject: [PATCH] Add comments and fix typo Things I looked up to better understand the example. add if you think it will help others. --- example/node.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/node.js b/example/node.js index 467e09e..4efc266 100644 --- a/example/node.js +++ b/example/node.js @@ -4,7 +4,7 @@ const fs = require('fs'); const path = require('path'); const tf = require('@tensorflow/tfjs-node'); const faceapi = require('../dist/face-api.node.js'); -// if you heve module installed, this would be +// if you have module installed, this would be // const faceapi = require('@vladmandic/face-api'); // configuration options @@ -39,10 +39,10 @@ async function image(img) { async function main() { // initialize tfjs log('FaceAPI Test'); - await faceapi.tf.setBackend('tensorflow'); + await faceapi.tf.setBackend('tensorflow'); //Sets the backend (cpu, webgl, wasm, tensorflow, etc) responsible for creating tensors and executing operations on those tensors. await faceapi.tf.enableProdMode(); await faceapi.tf.ENV.set('DEBUG', false); - await faceapi.tf.ready(); + await faceapi.tf.ready(); //Returns a promise that resolves when the currently selected backend (or the highest priority one) has initialized. // check version log(`Version: TensorFlow/JS ${str(faceapi.tf?.version_core || '(not loaded)')} FaceAPI ${str(faceapi?.version || '(not loaded)')} Backend: ${str(faceapi.tf?.getBackend() || '(not loaded)')}`);