This directory includes performance benchmarks and validation tests of TensorFlow.js. This is work in progress and the command lines and APIs are subject to frequent changes.
TODO(annyuan): Add doc.
To run the browser-based layers benchmarks, do:
yarn benchmark --layersUse the --log flag to cause the benchmark data and related metadata to be
logged to Cloud Firestore.
yarn benchmark --layers --logTo run the tfjs-node (CPU) benchmarks, do:
yarn benchmark --layers --tfjs-nodeTo run the tfjs-node-gpu (CUDA GPU) benchmarks, do:
yarn benchmark --layers --tfjs-node-gpuObviously, this requires a CUDA-enabled GPU and all required drivers and libraries to be set up properly on the system.
Also, note that using the --tfjs-node-gpu will cause the the GPU (CUDA)
version of TensorFlow (Python) to be installed and used for comparison.
Add the --log flag to cause the benchmark data and related metadata to be
logged to Cloud Firestore. This requires you set the
GOOGLE_APPLICATION_CREDENTIALS environment variable and point it
to the service-account JSON file. See this Google Cloud documentation page
for more details:
https://cloud.google.com/docs/authentication/getting-started
To run the browser-based GraphModel converter validation tests, do:
yarn validate_converter