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

Function randomNormalVariable

tfjs-layers/src/variables.ts:275–285  ·  view source on GitHub ↗
(
    shape: Shape, mean = 0.0, stddev = 1.0, dtype?: DataType, seed?: number,
    name = 'randomNormal')

Source from the content-addressed store, hash-verified

273 * @return The truncated-normal-random Variable.
274 */
275export function randomNormalVariable(
276 shape: Shape, mean = 0.0, stddev = 1.0, dtype?: DataType, seed?: number,
277 name = 'randomNormal'): LayerVariable {
278 dtype = dtype || 'float32';
279 if (dtype !== 'float32' && dtype !== 'int32') {
280 throw new NotImplementedError(
281 `randomNormalVariable does not support dType ${dtype}.`);
282 }
283 return new LayerVariable(
284 tfc.randomNormal(shape, mean, stddev, dtype, seed), dtype, name);
285}
286
287/**
288 * Update the value of a Variable.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…