license import { KernelConfig , KernelFunc , Pack , PackAttrs , PackInputs , Tensor , TensorInfo } from '@tensorflow/tfjs' ; import { createTensorsTypeOpAttr , NodeJSKernelBackend } from '../nodejs_kernel_backend' ; export function pack ( args ) { const { inputs , backend , attrs } = args ; const { axis } = attrs ; const opAttrs = [ { name : 'N' , type : backend . binding . TF_ATTR_INT , value : inputs . length } , createTensorsTypeOpAttr ( 'T' , inputs as Tensor [ ] ) , { name : 'axis' , type : backend . binding . TF_ATTR_INT , value : axis } ] ; const res = backend . executeSingleOutput ( Pack , opAttrs , inputs ) ; return res ; } export const packConfig = { kernelName : Pack , backendName : 'tensorflow' , kernelFunc : pack as { } as KernelFunc } ;