MCPcopy Index your code
hub / github.com/tensorflow/tfjs / batchSetValue

Function batchSetValue

tfjs-layers/src/variables.ts:335–341  ·  view source on GitHub ↗
(
    variablesAndValues: Array<[LayerVariable, Tensor]>)

Source from the content-addressed store, hash-verified

333 * carries the new value.
334 */
335export function batchSetValue(
336 variablesAndValues: Array<[LayerVariable, Tensor]>): void {
337 variablesAndValues.forEach(variableAndValue => {
338 const variable: LayerVariable = variableAndValue[0];
339 variable.write(variableAndValue[1]);
340 });
341}
342
343/**
344 * Returns the gradients of `variables` w.r.t. the return value of `lossFn`.

Callers 3

loadWeightsFunction · 0.90
setWeightsFunction · 0.90
setWeightsMethod · 0.90

Calls 1

writeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…