Creates tensors in func_graph to represent template_tensors. Args: func_graph: FuncGraph. template_tensor: a tensor in the outer graph. Returns: A tensor in func_graph.
(func_graph, template_tensor)
| 660 | |
| 661 | |
| 662 | def _create_dummy_input(func_graph, template_tensor): |
| 663 | """Creates tensors in func_graph to represent template_tensors. |
| 664 | |
| 665 | Args: |
| 666 | func_graph: FuncGraph. |
| 667 | template_tensor: a tensor in the outer graph. |
| 668 | |
| 669 | Returns: |
| 670 | A tensor in func_graph. |
| 671 | """ |
| 672 | with func_graph.as_default(): |
| 673 | return array_ops.placeholder( |
| 674 | template_tensor.dtype, shape=template_tensor.shape) |
| 675 | |
| 676 | |
| 677 | def _create_none_optionals(func_graph, n): |
no test coverage detected