(
args: {inputs: PackInputs, backend: NodeJSKernelBackend, attrs: PackAttrs})
| 19 | import {createTensorsTypeOpAttr, NodeJSKernelBackend} from '../nodejs_kernel_backend'; |
| 20 | |
| 21 | export function pack( |
| 22 | args: {inputs: PackInputs, backend: NodeJSKernelBackend, attrs: PackAttrs}): |
| 23 | TensorInfo { |
| 24 | const {inputs, backend, attrs} = args; |
| 25 | const {axis} = attrs; |
| 26 | |
| 27 | const opAttrs = [ |
| 28 | {name: 'N', type: backend.binding.TF_ATTR_INT, value: inputs.length}, |
| 29 | createTensorsTypeOpAttr('T', inputs as Tensor[]), |
| 30 | {name: 'axis', type: backend.binding.TF_ATTR_INT, value: axis} |
| 31 | ]; |
| 32 | |
| 33 | const res = backend.executeSingleOutput(Pack, opAttrs, inputs); |
| 34 | return res; |
| 35 | } |
| 36 | |
| 37 | export const packConfig: KernelConfig = { |
| 38 | kernelName: Pack, |
nothing calls this directly
no test coverage detected
searching dependent graphs…