美文网首页Python自学之路
tf.control_dependencies([])函数含义及

tf.control_dependencies([])函数含义及

作者: 一位学有余力的同学 | 来源:发表于2019-02-23 14:01 被阅读1次

tf.control_dependencies([controls_input])

该函数是指定某些操作的依赖关系,例如:

with tf.control_dependencies([a,b]):
     c
     d

表示c和d的执行都要在a和b环境的条件下

with tf.control_dependecies([train_step,ema_op])
    train_op=tf.no_op(name='train')

tf.no_op()表示执行完train_step,ema_op后无操作。
参考博客

相关文章

网友评论

    本文标题:tf.control_dependencies([])函数含义及

    本文链接:https://www.haomeiwen.com/subject/llqpyqtx.html