license import { Exp , ExpInputs , KernelConfig , Tensor } from '@tensorflow/tfjs' ; import { NodeJSKernelBackend } from '../nodejs_kernel_backend' ; export const expConfig = { kernelName : Exp , backendName : 'tensorflow' , kernelFunc : ( args ) => { const { x } = args . inputs as ExpInputs ; const backend = args . backend as NodeJSKernelBackend ; let xTensor = x ; if ( x . dtype === 'int32' ) { xTensor = ( x as Tensor ) . toFloat ( ) ; ( x as Tensor ) . dispose ( ) ; } return backend . executeSingleInput ( Exp , xTensor ) ; } } ;