license import { KernelConfig , Sub } from '@tensorflow/tfjs-core' ; import { createSimpleBinaryKernelImpl } from '../utils/binary_impl' ; import { binaryKernelFunc , createComplexBinaryKernelImpl } from '../utils/binary_utils' ; export const subImpl = createSimpleBinaryKernelImpl ( ( ( aValue , bValue ) => aValue - bValue ) ) ; export const subComplexImpl = createComplexBinaryKernelImpl ( ( ( aReal , aImag , bReal , bImag ) => { return { real : aReal - bReal , imag : aImag - bImag } ; } ) ) ; export const sub = binaryKernelFunc ( Sub , subImpl , subComplexImpl ) ; export const subConfig = { kernelName : Sub , backendName : 'cpu' , kernelFunc : sub } ;