MCPcopy
hub / github.com/tensorflow/tfjs / predict

Function predict

e2e/benchmarks/benchmark_util_test.js:109–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107
108 it('profile all statements in async predict function', async () => {
109 const predict = async () => {
110 await sleep(1);
111 const x = tf.tensor1d([1, 2, 3]);
112 const x2 = x.square();
113 x2.dispose();
114 return x;
115 };
116
117 const oldTensorCount = tf.memory().numTensors;
118 let profileInfo = await profileInference(predict);

Callers 4

model_config.jsFile · 0.70
timeInferenceFunction · 0.70
timeFirstInferenceFunction · 0.70
profileInferenceFunction · 0.70

Calls 3

squareMethod · 0.80
sleepFunction · 0.70
disposeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…