license import { KernelConfig , SquaredDifference } from '@tensorflow/tfjs-core' ; import { createSimpleBinaryKernelImpl } from '../utils/binary_impl' ; import { binaryKernelFunc } from '../utils/binary_utils' ; export const squaredDifferenceImpl = createSimpleBinaryKernelImpl ( ( ( a , b ) => { const diff = a - b ; return diff * diff ; } ) ) ; export const squaredDifference = binaryKernelFunc ( SquaredDifference , squaredDifferenceImpl ) ; export const squaredDifferenceConfig = { kernelName : SquaredDifference , backendName : 'cpu' , kernelFunc : squaredDifference } ;