license import { backend_util , DepthwiseConv2dNativeBackpropInput , DepthwiseConv2dNativeBackpropInputAttrs , DepthwiseConv2dNativeBackpropInputInputs , KernelConfig , KernelFunc } from '@tensorflow/tfjs-core' ; import { MathBackendWebGL } from '../backend_webgl' ; import { DepthwiseConv2DDerInputProgram } from '../conv_backprop_gpu_depthwise' ; export function depthwiseConv2dNativeBackpropInput ( args ) { const { inputs , backend , attrs } = args ; const { dy , filter } = inputs ; const { strides , dilations , pad , dimRoundingMode , inputShape } = attrs ; const convInfo = backend_util . computeConv2DInfo ( inputShape , filter . shape as [ number , number , number , number ] , strides , dilations , pad , dimRoundingMode , true ) ; const program = new DepthwiseConv2DDerInputProgram ( convInfo ) ; return backend . runWebGLProgram ( program , [ dy , filter ] , 'float32' ) ; } export const depthwiseConv2dNativeBackpropInputConfig = { kernelName : DepthwiseConv2dNativeBackpropInput , backendName : 'webgl' , kernelFunc : depthwiseConv2dNativeBackpropInput as { } as KernelFunc } ;