license import * as tfc from '@tensorflow/tfjs-core' ; param inputsData param inputsShapes export function createInputTensors ( inputsData , inputsShapes , inputDtypes ? , inputNames ? ) { const xs = [ ] ; for ( let i = 0 ; i < inputsData . length ; i ++ ) { const input = tfc . tensor ( inputsData [ i ] , inputsShapes [ i ] , inputDtypes ? inputDtypes [ i ] : 'float32' ) ; xs . push ( input ) ; } if ( inputNames ) { return inputNames . reduce ( ( map , name , index ) => { map [ name ] = xs [ index ] ; return map ; } , { } ) ; } return xs ; }