license import { ComplexAbs , ComplexAbsInputs , KernelConfig } from '@tensorflow/tfjs' ; import { createTensorsTypeOpAttr , NodeJSKernelBackend } from '../nodejs_kernel_backend' ; export const complexAbsConfig = { kernelName : ComplexAbs , backendName : 'tensorflow' , kernelFunc : ( args ) => { const { x } = args . inputs as ComplexAbsInputs ; const backend = args . backend as NodeJSKernelBackend ; const opAttrs = [ createTensorsTypeOpAttr ( 'T' , x . dtype ) , createTensorsTypeOpAttr ( 'Tout' , 'float32' ) ] ; return backend . executeSingleOutput ( ComplexAbs , opAttrs , [ x ] ) ; } } ;