MCPcopy
hub / github.com/tensorflow/tfjs-examples / append

Method append

snake-dqn/train.js:39–42  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

37 }
38
39 append(x) {
40 this.buffer.shift();
41 this.buffer.push(x);
42 }
43
44 average() {
45 return this.buffer.reduce((x, prev) => x + prev) / this.buffer.length;

Callers 8

trainFunction · 0.95
playStepMethod · 0.45
initVisualizationFunction · 0.45
read_dataFunction · 0.45
renderLatentSpaceFunction · 0.45
loadFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected