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

Function variable

tfjs-core/src/ops/variable.ts:38–43  ·  view source on GitHub ↗
(
    initialValue: Tensor<R>, trainable = true, name?: string,
    dtype?: DataType)

Source from the content-addressed store, hash-verified

36 * @doc {heading: 'Tensors', subheading: 'Creation'}
37 */
38export function variable<R extends Rank>(
39 initialValue: Tensor<R>, trainable = true, name?: string,
40 dtype?: DataType): Variable<R> {
41 return ENGINE.makeVariable(initialValue, trainable, name, dtype) as
42 Variable<R>;
43}

Callers

nothing calls this directly

Calls 1

makeVariableMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…