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

Method apply

tfjs-layers/src/initializers.ts:207–214  ·  view source on GitHub ↗
(shape: Shape, dtype?: DataType)

Source from the content-addressed store, hash-verified

205 }
206
207 apply(shape: Shape, dtype?: DataType): Tensor {
208 dtype = dtype || 'float32';
209 if (dtype !== 'float32' && dtype !== 'int32') {
210 throw new NotImplementedError(
211 `truncatedNormal does not support dType ${dtype}.`);
212 }
213 return truncatedNormal(shape, this.mean, this.stddev, dtype, this.seed);
214 }
215
216 override getConfig(): serialization.ConfigDict {
217 return {mean: this.mean, stddev: this.stddev, seed: this.seed};

Callers

nothing calls this directly

Calls 1

truncatedNormalFunction · 0.85

Tested by

no test coverage detected