license import { TensorInfo } from '@tensorflow/tfjs-core' ; import { MathBackendWebGL } from '../backend_webgl' ; import { UnaryOpProgram } from '../unaryop_gpu' ; const TO_INT = `return float(int(x));` ; export function int ( input , backend ) { const program = new UnaryOpProgram ( input . shape , TO_INT ) ; const output = backend . runWebGLProgram ( program , [ input ] , 'int32' ) ; return { dataId : output . dataId , shape : output . shape , dtype : output . dtype } ; }