* Executes the predict function for `model` (`model.predict` for tf.LayersModel * and `model.executeAsync` for tf.GraphModel) and times the inference process * for `numRuns` rounds. Then returns a promise that resolves with information * about the model's inference time: * - `times`: an array of
(model, input, numRuns = 1)
| 208 | * @param numRuns The number of rounds for timing the inference process. |
| 209 | */ |
| 210 | async function timeModelInference(model, input, numRuns = 1) { |
| 211 | const predict = getPredictFnForModel(model, input); |
| 212 | return timeInference(predict, numRuns); |
| 213 | } |
| 214 | |
| 215 | /** |
| 216 | * Executes `predict()` and times the inference process for `numRuns` rounds. |
no test coverage detected
searching dependent graphs…