(dy: Tensor)
| 507 | {x} as unknown as NamedTensorMap); |
| 508 | const inputs = {x}; |
| 509 | const grad = (dy: Tensor) => ({ |
| 510 | x: () => { |
| 511 | const dtype = 'float32'; |
| 512 | const gradInputs = {x: dy}; |
| 513 | const attrs = {dtype}; |
| 514 | |
| 515 | return ENGINE.runKernel( |
| 516 | Cast, gradInputs as unknown as NamedTensorMap, |
| 517 | // tslint:disable-next-line: no-unnecessary-type-assertion |
| 518 | attrs as unknown as NamedAttrMap) as Tensor; |
| 519 | } |
| 520 | }); |
| 521 | const saved: Tensor[] = []; |
| 522 | this.addTapeNode(this.state.activeScope.name, inputs, [y], grad, saved, {}); |
| 523 | return y; |
no test coverage detected