当前位置: 首页 > 工具软件 > Graph.Editor > 使用案例 >

tf.contrib.graph_editor.graph_replace

茅星华
2023-12-01

摘自
:https://tensorflow.google.cn/versions/r1.15/api_docs/python/tf/contrib/graph_editor/graph_replace

创建一个新的图graph用于计算replaced tensor的目标值

tf.contrib.graph_editor.graph_replace(
    target_ts,
    replacement_ts,
    dst_scope='',
    src_scope='',
    reuse_dst_scope=False
)

Args:

  • target_ts: a single tf.Tensor or an iterable of tf.Tensor.
    replacement_ts: dictionary mapping from original tensors to replaced tensors
  • dst_scope: the destination scope.
  • src_scope: the source scope.
  • reuse_dst_scope: if True the dst_scope is re-used if it already exists. Otherwise, the scope is given a unique name based on the one given by appending an underscore followed by a digit (default).

Returns:

  • A single tf.Tensor or a list of target tf.Tensor, depending on the type of the input argument target_ts. The returned tensors are recomputed using the tensors from replacement_ts.
 类似资料:

相关阅读

相关文章

相关问答