contrib.graph_editor.swap_ts

tf.contrib.graph_editor.swap_ts

tf.contrib.graph_editor.swap_ts

swap_ts(
    ts0,
    ts1,
    can_modify=None,
    cannot_modify=None
)

Defined in tensorflow/contrib/graph_editor/reroute.py.

See the guide: Graph Editor (contrib) > Module: reroute

For each tensor's pair, swap the end of (t0,t1).

B0 B1 B0 B1 | | => X A0 A1 A0 A1

Args:

  • ts0: an object convertible to a list of tf.Tensor.
  • ts1: an object convertible to a list of tf.Tensor.
  • can_modify: iterable of operations which can be modified. Any operation outside within_ops will be left untouched by this function.
  • cannot_modify: iterable of operations which cannot be modified. Any operation within cannot_modify will be left untouched by this function.

Returns:

The number of individual modifications made by the function.

Raises:

  • TypeError: if ts0 or ts1 cannot be converted to a list of tf.Tensor.
  • TypeError: if can_modify or cannot_modify is not None and cannot be converted to a list of tf.Operation.

© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/graph_editor/swap_ts

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部