license import { ENGINE } from '../engine' ; import { Erf , ErfInputs } from '../kernel_names' ; import { Tensor } from '../tensor' ; import { NamedTensorMap } from '../tensor_types' ; import { convertToTensor } from '../tensor_util_env' ; import { TensorLike } from '../types' ; import * as util from '../util' ; import { cast } from './cast' ; import { op } from './operation' ; param x doc function erf_ < T extends Tensor > ( x ) { let $x = convertToTensor ( x , 'x' , 'erf' ) ; util . assert ( $x . dtype === 'int32' || $x . dtype === 'float32' , ( ) => 'Input dtype must be `int32` or `float32`.' ) ; if ( $x . dtype === 'int32' ) { $x = cast ( $x , 'float32' ) ; } const inputs = { x : $x } ; return ENGINE . runKernel ( Erf , inputs as { } as NamedTensorMap ) ; } export const erf = op ( { erf_ } ) ;