license import { backend_util , KernelConfig , Sub , SubInputs } from '@tensorflow/tfjs' ; import { createTensorsTypeOpAttr , NodeJSKernelBackend } from '../nodejs_kernel_backend' ; export const subConfig = { kernelName : Sub , backendName : 'tensorflow' , kernelFunc : ( args ) => { const { a , b } = args . inputs as SubInputs ; const backend = args . backend as NodeJSKernelBackend ; const opAttrs = [ createTensorsTypeOpAttr ( 'T' , backend_util . upcastType ( a . dtype , b . dtype ) ) ] ; return backend . executeSingleOutput ( Sub , opAttrs , [ a , b ] ) ; } } ;