MCPcopy
hub / github.com/tensorflow/tfjs / randomStandardNormal_

Function randomStandardNormal_

tfjs-core/src/ops/random_standard_normal.ts:39–45  ·  view source on GitHub ↗

* Creates a `tf.Tensor` with values sampled from a normal distribution. * * The generated values will have mean 0 and standard deviation 1. * * ```js * tf.randomStandardNormal([2, 2]).print(); * ``` * * @param shape An array of integers defining the output tensor shape. * @param dtype The d

(
    shape: ShapeMap[R], dtype?: 'float32'|'int32', seed?: number)

Source from the content-addressed store, hash-verified

37 * @doc {heading: 'Tensors', subheading: 'Random'}
38 */
39function randomStandardNormal_<R extends Rank>(
40 shape: ShapeMap[R], dtype?: 'float32'|'int32', seed?: number): Tensor<R> {
41 if (dtype != null && (dtype as DataType) === 'bool') {
42 throw new Error(`Unsupported data type ${dtype}`);
43 }
44 return randomNormal(shape, 0, 1, dtype, seed);
45}
46
47export const randomStandardNormal = /* @__PURE__ */ op({randomStandardNormal_});

Callers

nothing calls this directly

Calls 1

randomNormalFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…