MCPcopy
hub / github.com/tensorflow/tfjs-examples / parseArgs

Function parseArgs

quantization/eval_mobilenetv2.js:30–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28let tf;
29
30function parseArgs() {
31 const parser = new argparse.ArgumentParser({
32 description:
33 'TensorFlow.js Quantization Example: Evaluating an MNIST Model',
34 addHelp: true
35 });
36 parser.addArgument('modelSavePath', {
37 type: 'string',
38 help: 'Path at which the model to be evaluated is saved.'
39 });
40 parser.addArgument('imageDir', {
41 type: 'string',
42 help: 'Path at the directory under which the test images are stored.'
43 });
44 parser.addArgument('--gpu', {
45 action: 'storeTrue',
46 help: 'Use tfjs-node-gpu for evaluation (requires CUDA-enabled ' +
47 'GPU and supporting drivers and libraries.'
48 });
49 return parser.parseArgs();
50}
51
52async function readImageTensorFromFile(filePath, height, width) {
53 return new Promise((resolve, reject) => {

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected