MCPcopy Create free account
hub / github.com/tensorflow/tfjs / kernelFunc

Function kernelFunc

tfjs-node/src/kernels/FlipLeftRight.ts:25–39  ·  view source on GitHub ↗
({inputs, backend})

Source from the content-addressed store, hash-verified

23 kernelName: FlipLeftRight,
24 backendName: 'tensorflow',
25 kernelFunc({inputs, backend}) {
26 const nodeBackend = backend as NodeJSKernelBackend;
27 const {image} = inputs as FlipLeftRightInputs;
28 const opAttrs = [
29 createTensorsTypeOpAttr('Tidx', 'int32'),
30 createTensorsTypeOpAttr('T', image.dtype),
31 ];
32 const axes = util.parseAxisParam([2], image.shape);
33 const axisTensor = tensor1d(axes, 'int32');
34 const res =
35 nodeBackend.executeSingleOutput(
36 'ReverseV2', opAttrs, [image, axisTensor]);
37 axisTensor.dispose();
38 return res;
39 }
40};

Callers

nothing calls this directly

Calls 4

createTensorsTypeOpAttrFunction · 0.90
tensor1dFunction · 0.90
executeSingleOutputMethod · 0.80
disposeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…