MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _create_dummy_input

Function _create_dummy_input

tensorflow/python/ops/cond_v2.py:662–674  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

660
661
662def _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
677def _create_none_optionals(func_graph, n):

Callers 1

_make_inputs_matchFunction · 0.85

Calls 2

as_defaultMethod · 0.45
placeholderMethod · 0.45

Tested by

no test coverage detected