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

Method maybeWait

tfjs-layers/src/base_callbacks.ts:403–411  ·  view source on GitHub ↗
(epoch: number, batch: number, logs: UnresolvedLogs)

Source from the content-addressed store, hash-verified

401 }
402
403 async maybeWait(epoch: number, batch: number, logs: UnresolvedLogs) {
404 const ps: Array<void|Promise<void>> = [];
405 if (this.yield != null) {
406 await resolveScalarsInLogs(logs);
407 ps.push(this.yield(epoch, batch, logs as Logs));
408 }
409 ps.push(this.nextFrameFunc());
410 await Promise.all(ps);
411 }
412
413 override async onEpochBegin(epoch: number, logs?: UnresolvedLogs):
414 Promise<void> {

Callers 1

onBatchEndMethod · 0.95

Calls 3

resolveScalarsInLogsFunction · 0.90
allMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected