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

Function assertNonNegativeIntegerDimensions

tfjs-core/src/util_base.ts:678–686  ·  view source on GitHub ↗
(shape: number[])

Source from the content-addressed store, hash-verified

676}
677
678export function assertNonNegativeIntegerDimensions(shape: number[]) {
679 shape.forEach(dimSize => {
680 assert(
681 Number.isInteger(dimSize) && dimSize >= 0,
682 () =>
683 `Tensor must have a shape comprised of positive integers but got ` +
684 `shape [${shape}].`);
685 });
686}
687
688/**
689 * Computes flat index for a given location (multidimentionsal index) in a

Callers 12

truncatedNormal_Function · 0.90
fillFunction · 0.90
randomGamma_Function · 0.90
makeTensorFunction · 0.90
broadcastTo_Function · 0.90
sparseToDense_Function · 0.90
rand_Function · 0.90
randomUniform_Function · 0.90
scatterND_Function · 0.90
randomNormal_Function · 0.90
zerosFunction · 0.90
onesFunction · 0.90

Calls 1

assertFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…