license import { ENGINE } from '../engine' ; import { LeakyRelu , LeakyReluAttrs , LeakyReluInputs } from '../kernel_names' ; import { NamedAttrMap } from '../kernel_registry' ; import { Tensor } from '../tensor' ; import { NamedTensorMap } from '../tensor_types' ; import { convertToTensor } from '../tensor_util_env' ; import { TensorLike } from '../types' ; import { op } from './operation' ; param x param alpha doc function leakyRelu_ < T extends Tensor > ( x , alpha = 0.2 ) { const $x = convertToTensor ( x , 'x' , 'leakyRelu' ) ; const inputs = { x : $x } ; const attrs = { alpha } ; return ENGINE . runKernel ( LeakyRelu , inputs as { } as NamedTensorMap , attrs as { } as NamedAttrMap ) ; } export const leakyRelu = op ( { leakyRelu_ } ) ;