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

Function _create_none_optionals

tensorflow/python/ops/cond_v2.py:677–688  ·  view source on GitHub ↗

Creates `n` `None` optionals in func_graph. Args: func_graph: FuncGraph. n: `int` the number of `None` optionals to make. Returns: A list of tensors in func_graph.

(func_graph, n)

Source from the content-addressed store, hash-verified

675
676
677def _create_none_optionals(func_graph, n):
678 """Creates `n` `None` optionals in func_graph.
679
680 Args:
681 func_graph: FuncGraph.
682 n: `int` the number of `None` optionals to make.
683
684 Returns:
685 A list of tensors in func_graph.
686 """
687 with func_graph.as_default():
688 return [gen_dataset_ops.optional_none() for _ in range(n)]
689
690
691def _create_fakeparams(func_graph, template_tensors):

Callers 1

Calls 2

rangeFunction · 0.70
as_defaultMethod · 0.45

Tested by

no test coverage detected