tensorflow API:tf.control_dependencies
2017-12-19 15:27
399 查看
原文参考:
http://blog.csdn.net/u012436149/article/details/72084744
Args: control_inputs: A list of Operation or Tensor objects which must be executed or computed before running the operations defined in the context. Can also be None to clear the control dependencies.
ARGS:
control_inputs:在运行上下文中定义的操作之前必须执行或计算的 Operation 列表或 Tensor 对象。也可以是不清除控件依赖项。
Returns: A context manager that specifies control dependencies for all operations constructed within the context.
返回:
指定上下文中构建的所有操作的控制依赖关系的上下文管理器。
例子:
http://blog.csdn.net/u012436149/article/details/72084744
Args: control_inputs: A list of Operation or Tensor objects which must be executed or computed before running the operations defined in the context. Can also be None to clear the control dependencies.
ARGS:
control_inputs:在运行上下文中定义的操作之前必须执行或计算的 Operation 列表或 Tensor 对象。也可以是不清除控件依赖项。
Returns: A context manager that specifies control dependencies for all operations constructed within the context.
返回:
指定上下文中构建的所有操作的控制依赖关系的上下文管理器。
例子:
opt = tf.train.Optimizer().minize(loss) with tf.control_dependencies([opt]): updated_weight = tf.identity(weight) with tf.Session() as sess: tf.global_variables_initializer().run() sess.run(updated_weight, feed_dict={...}) # 这样每次得到的都是更新后的weight
相关文章推荐
- tensorflow API: tf.unsorted_segment_sum
- tensorflow API: tf.get_variable
- tensorflow API: tf.unsorted_segment_sum
- tensorflow API:tf.Variable
- tensorflow API:tf.set_random_seed
- tensorflow API:tf.split
- tensorflow API:tf.slice
- tensorflow API:tf.reduce_sum
- tensorflow API:tf.group
- tensorflow API:tf.tile
- tf-8.Tensorflow Object Dection API 物体检测
- tensorflow API:tf.not_equal
- tensorflow API: tf.one_hot
- tensorflow API:tf.truncated_normal
- tensorflow API学习——tf.strided_slice
- tensorflow API:tf.argmin
- tensorflow API : tf.summary
- tensorflow API: tf.clip_by_value
- 学习笔记TF067:TensorFlow Serving、Flod、计算加速,机器学习评测体系,公开数据集
- tensorflow object detection API安装