license import { KernelConfig , ResizeBilinearGrad , ResizeBilinearGradAttrs , ResizeBilinearGradInputs } from '@tensorflow/tfjs' ; import { createTensorsTypeOpAttr , NodeJSKernelBackend } from '../nodejs_kernel_backend' ; export const resizeBilinearGradConfig = { kernelName : ResizeBilinearGrad , backendName : 'tensorflow' , kernelFunc : ( args ) => { const { images , dy } = args . inputs as ResizeBilinearGradInputs ; const backend = args . backend as NodeJSKernelBackend ; const { alignCorners } = args . attrs as { } as ResizeBilinearGradAttrs ; const opAttrs = [ createTensorsTypeOpAttr ( 'T' , images . dtype ) , { name : 'align_corners' , type : backend . binding . TF_ATTR_BOOL , value : alignCorners } ] ; return backend . executeSingleOutput ( ResizeBilinearGrad , opAttrs , [ dy , images ] ) ; } } ;