license import { KernelConfig , KernelFunc , LRNGrad , LRNGradAttrs , LRNGradInputs , TensorInfo } from '@tensorflow/tfjs-core' ; import { MathBackendWebGL } from '../backend_webgl' ; import { LRNGradProgram } from '../lrn_grad_gpu' ; export const lrnGrad = ( args ) : TensorInfo => { const { inputs , backend , attrs } = args ; const { x , y , dy } = inputs ; const { depthRadius , bias , alpha , beta } = attrs ; const program = new LRNGradProgram ( x . shape , depthRadius , bias , alpha , beta ) ; return backend . runWebGLProgram ( program , [ x , y , dy ] , x . dtype ) ; } ; export const LRNGradConfig = { kernelName : LRNGrad , backendName : 'webgl' , kernelFunc : lrnGrad as { } as KernelFunc } ;