license import { KernelConfig , KernelFunc , ResizeBilinearGrad , ResizeBilinearGradAttrs , ResizeBilinearGradInputs , TensorInfo } from '@tensorflow/tfjs-core' ; import { MathBackendWebGL } from '../backend_webgl' ; import { ResizeBilinearBackpropProgram } from '../resize_bilinear_backprop_gpu' ; export function resizeBilinearGrad ( args ) { const { inputs , backend , attrs } = args ; const { images , dy } = inputs ; const { alignCorners } = attrs ; const program = new ResizeBilinearBackpropProgram ( dy . shape as [ number , number , number , number ] , images . shape as [ number , number , number , number ] , alignCorners ) ; return backend . runWebGLProgram ( program , [ dy ] , dy . dtype ) ; } export const resizeBilinearGradConfig = { kernelName : ResizeBilinearGrad , backendName : 'webgl' , kernelFunc : resizeBilinearGrad as { } as KernelFunc } ;