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

Method constructor

tfjs-data/src/iterators/lazy_iterator.ts:1148–1154  ·  view source on GitHub ↗
(
    protected override upstream: LazyIterator<T>, protected windowSize: number,
      seed?: string)

Source from the content-addressed store, hash-verified

1146 private upstreamExhausted = false;
1147
1148 constructor(
1149 protected override upstream: LazyIterator<T>, protected windowSize: number,
1150 seed?: string) {
1151 super(upstream, windowSize);
1152 this.random = seedrandom.alea(seed || tf.util.now().toString());
1153 this.lastRead = Promise.resolve({value: null, done: false});
1154 }
1155
1156 override async next(): Promise<IteratorResult<T>> {
1157 // This sets this.lastRead to a new Promise right away, as opposed to

Callers

nothing calls this directly

Calls 2

toStringMethod · 0.80
nowMethod · 0.65

Tested by

no test coverage detected