license import { GatherNd , GatherNdInputs , KernelConfig } from '@tensorflow/tfjs' ; import { createTensorsTypeOpAttr , NodeJSKernelBackend } from '../nodejs_kernel_backend' ; export const gatherNdConfig = { kernelName : GatherNd , backendName : 'tensorflow' , kernelFunc : ( args ) => { const { params , indices } = args . inputs as GatherNdInputs ; const backend = args . backend as NodeJSKernelBackend ; const opAttrs = [ createTensorsTypeOpAttr ( 'Tparams' , params . dtype ) , createTensorsTypeOpAttr ( 'Tindices' , 'int32' ) ] ; return backend . executeSingleOutput ( GatherNd , opAttrs , [ params , indices ] ) ; } } ;