def _create_fakeparams(func_graph, template_tensors): """Create FakeParams for the XLA case.""" with func_graph.as_default(): return [ gen_functional_ops.fake_param(dtype=t.dtype, shape=t.shape) for t in template_tensors ]
def _create_dummy_params(func_graph, template_tensors): """Creates tensors in func_graph to represent template_tensors. Args: func_graph: FuncGraph. template_tensors: a list of tensors in the outer graph. Returns: A list of tensors in func_graph. """ with func_graph.as_default(): return [gen_functional_ops.fake_param(dtype=t.dtype, shape=t.shape) for t in template_tensors]
def _create_dummy_params(func_graph, template_tensors): """Creates tensors in func_graph to represent template_tensors. Args: func_graph: function.FuncGraph. template_tensors: a list of tensors in the outer graph. Returns: A list of tensors in func_graph. """ with func_graph.as_default(): return [gen_functional_ops.fake_param(dtype=t.dtype, shape=t.shape) for t in template_tensors]
def _create_fakeparams(func_graph, template_tensors): """Create FakeParams for the XLA case.""" with func_graph.as_default(): return [gen_functional_ops.fake_param(dtype=t.dtype, shape=t.shape) for t in template_tensors]