MCPcopy
hub / github.com/tensorflow/tfjs / unaryKernelFunc

Function unaryKernelFunc

tfjs-backend-cpu/src/utils/unary_utils.ts:34–42  ·  view source on GitHub ↗
(
  name: string, op: SimpleUnaryOperation<I, O>,
  dtype?: DataTypeFor<O>)

Source from the content-addressed store, hash-verified

32 * kernels that return bool type, such as isFinite, isInf, etc.
33 */
34export function unaryKernelFunc<I extends number | string = number,
35 O extends number | string = number>(
36 name: string, op: SimpleUnaryOperation<I, O>,
37 dtype?: DataTypeFor<O>): KernelFunc {
38
39 const impl = createSimpleUnaryImpl<I, O>(op);
40
41 return unaryKernelFuncFromImpl<I, O>(name, impl, dtype);
42}
43
44/**
45 * Template that creates a `KernelFunc` for unary ops from the given

Callers 15

Cosh.tsFile · 0.90
IsFinite.tsFile · 0.90
Reciprocal.tsFile · 0.90
Tanh.tsFile · 0.90
Tan.tsFile · 0.90
IsInf.tsFile · 0.90
Softplus.tsFile · 0.90
Sinh.tsFile · 0.90
Acos.tsFile · 0.90
IsNaN.tsFile · 0.90
Atanh.tsFile · 0.90
Sign.tsFile · 0.90

Calls 2

createSimpleUnaryImplFunction · 0.90
unaryKernelFuncFromImplFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…