license import { AddN , AddNInputs , KernelConfig } from '@tensorflow/tfjs' ; import { createTensorsTypeOpAttr , NodeJSKernelBackend } from '../nodejs_kernel_backend' ; export const addNConfig = { kernelName : AddN , backendName : 'tensorflow' , kernelFunc : ( args ) => { const tensors = args . inputs as { } as AddNInputs ; const backend = args . backend as NodeJSKernelBackend ; const opAttrs = [ createTensorsTypeOpAttr ( 'T' , tensors [ 0 ] . dtype ) , { name : 'N' , type : backend . binding . TF_ATTR_INT , value : tensors . length } ] ; return backend . executeSingleOutput ( AddN , opAttrs , tensors ) ; } } ;