(...x: tf.Tensor[])
| 316 | |
| 317 | // Inputs as array. |
| 318 | const z = (...x: tf.Tensor[]) => |
| 319 | // tslint:disable-next-line: no-unnecessary-type-assertion |
| 320 | tf.engine().runKernel( |
| 321 | kernelName, x as unknown as tf.NamedTensorMap, {} /* attrs */) as |
| 322 | tf.Tensor; |
| 323 | const gradFunc = tf.grads(z); |
| 324 | const dx = gradFunc(x); |
| 325 | expect(kernelWasCalled).toBe(true); |