MCPcopy Create free account
hub / github.com/tensorflow/tfjs / getOutput

Method getOutput

tfjs-backend-webgl/src/pack_gpu.ts:125–137  ·  view source on GitHub ↗
(dims: string[])

Source from the content-addressed store, hash-verified

123 }
124
125 private getOutput(dims: string[]): string {
126 const sourceCoords = this.getSourceCoordsArr(dims);
127 if (this.rank === 1) {
128 const outShape =
129 this.enableShapeUniforms ? 'outShape' : this.outputShape[0];
130 return `getA(rc), (rc + 1 >= ${outShape} ? 0. : getA(rc + 1)), 0, 0`;
131 }
132
133 return `getA(${sourceCoords[0]}),
134 cEdge ? 0. : getA(${sourceCoords[1]}),
135 rEdge ? 0. : getA(${sourceCoords[2]}),
136 rEdge || cEdge ? 0. : getA(${sourceCoords[3]})`;
137 }
138}

Callers 1

constructorMethod · 0.95

Calls 1

getSourceCoordsArrMethod · 0.95

Tested by

no test coverage detected