(node: Node, tensorMap: NamedTensorsMap, context: ExecutionContext,
ops = tfOps)
| 27 | |
| 28 | export const executeOp: InternalOpExecutor = |
| 29 | (node: Node, tensorMap: NamedTensorsMap, context: ExecutionContext, |
| 30 | ops = tfOps): Tensor[] => { |
| 31 | switch (node.op) { |
| 32 | case 'Abs': |
| 33 | case 'ComplexAbs': |
| 34 | return [ops.abs( |
| 35 | getParamValue('x', node, tensorMap, context) as Tensor)]; |
| 36 | case 'Acos': |
| 37 | return [ops.acos( |
| 38 | getParamValue('x', node, tensorMap, context) as Tensor)]; |
| 39 | case 'Acosh': |
| 40 | return [ops.acosh( |
| 41 | getParamValue('x', node, tensorMap, context) as Tensor)]; |
| 42 | case 'Asin': |
| 43 | return [ops.asin( |
| 44 | getParamValue('x', node, tensorMap, context) as Tensor)]; |
| 45 | case 'Asinh': |
| 46 | return [ops.asinh( |
| 47 | getParamValue('x', node, tensorMap, context) as Tensor)]; |
| 48 | case 'Atan': |
| 49 | return [ops.atan( |
| 50 | getParamValue('x', node, tensorMap, context) as Tensor)]; |
| 51 | case 'Atan2': |
| 52 | return [ops.atan2( |
| 53 | getParamValue('x', node, tensorMap, context) as Tensor, |
| 54 | getParamValue('y', node, tensorMap, context) as Tensor)]; |
| 55 | case 'Atanh': |
| 56 | return [ops.atanh( |
| 57 | getParamValue('x', node, tensorMap, context) as Tensor)]; |
| 58 | case 'Ceil': |
| 59 | return [ops.ceil( |
| 60 | getParamValue('x', node, tensorMap, context) as Tensor)]; |
| 61 | case 'Complex': |
| 62 | return [ops.complex( |
| 63 | getParamValue('real', node, tensorMap, context) as Tensor, |
| 64 | getParamValue('imag', node, tensorMap, context) as Tensor)]; |
| 65 | case 'Cos': |
| 66 | return [ops.cos( |
| 67 | getParamValue('x', node, tensorMap, context) as Tensor)]; |
| 68 | case 'Cosh': |
| 69 | return [ops.cosh( |
| 70 | getParamValue('x', node, tensorMap, context) as Tensor)]; |
| 71 | case 'Elu': |
| 72 | return [ops.elu( |
| 73 | getParamValue('x', node, tensorMap, context) as Tensor)]; |
| 74 | case 'Erf': |
| 75 | return [ops.erf( |
| 76 | getParamValue('x', node, tensorMap, context) as Tensor)]; |
| 77 | case 'Exp': |
| 78 | return [ops.exp( |
| 79 | getParamValue('x', node, tensorMap, context) as Tensor)]; |
| 80 | case 'Expm1': { |
| 81 | return [ops.expm1( |
| 82 | getParamValue('x', node, tensorMap, context) as Tensor)]; |
| 83 | } |
| 84 | case 'Floor': |
| 85 | return [ops.floor( |
| 86 | getParamValue('x', node, tensorMap, context) as Tensor)]; |
no test coverage detected
searching dependent graphs…