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

Function assertNotComplex

tfjs-backend-cpu/src/cpu_util.ts:20–33  ·  view source on GitHub ↗
(
    tensor: TensorInfo|TensorInfo[], opName: string)

Source from the content-addressed store, hash-verified

18import {TensorInfo, util} from '@tensorflow/tfjs-core';
19
20export function assertNotComplex(
21 tensor: TensorInfo|TensorInfo[], opName: string): void {
22 if (!Array.isArray(tensor)) {
23 tensor = [tensor];
24 }
25 tensor.forEach(t => {
26 if (t != null) {
27 util.assert(
28 t.dtype !== 'complex64',
29 () => `${
30 opName} does not support complex64 tensors in the CPU backend.`);
31 }
32 });
33}

Callers 15

whereMethod · 0.90
binaryKernelFuncFunction · 0.90
unaryKernelFuncFromImplFunction · 0.90
selectFunction · 0.90
Square.tsFile · 0.90
allFunction · 0.90
anyFunction · 0.90
resizeBilinearFunction · 0.90
batchNormFunction · 0.90
stridedSliceFunction · 0.90
resizeNearestNeighborFunction · 0.90
maxPool3DFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…