Umm, RTD (read the docs)!
tf.select positive negative boolness condition.
tf.select(condition, t, e, name=None)
t e, .
t e , .
( .)
, :
threshold = tf.select(input > RLSA_THRESHOLD, positive, negative)
input > RLSA_THRESHOLD bool (0 1 ), positive negative.
, , RLSA_THRESHOLD 0,5, input - 4- 0 1. positive negative [1, 1, 1, 1] [0, 0, 0, 0], . input - [0.8, 0.2, 0.5, 0.6].
threshold [1, 0, 0, 1].
. positive negative , condition. positive negative , , [2, 4, 6, 8] [1, 3, 5, 7] , threshold [2, 3, 5, 8].
, input > RLSA_THRESHOLD, tf.select.
. input > RLSA_THRESHOLD () . . - . positive / negative , , , threshold , .
tf.select input > RLSA_THRESHOLD? , ?
, . - , - .
, :
threshold input > RLSA_THRESHOLD? , ?
, . , input > RLSA_THRESHOLD bool. threshold, , , positive negative.
.. ( ) , casting, tensorflow.