Python自学之路

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

2019-02-23  本文已影响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后无操作。
参考博客

上一篇 下一篇

猜你喜欢

热点阅读