這篇文章會介紹tf.cond這個operator,這個語法是tensorflow的if / else條件判斷式。我會再用tf.cond將上篇文章中的counter加上auto-reset的功能。
tf.cond