user3002273
user3002273

Reputation:

TensorFlow Boolean Tensor Operations Equivalents

I am looking for TensorFlow equivalents to the following Numpy operations

Comparison

Upvotes: 0

Views: 1231

Answers (1)

yuefengz
yuefengz

Reputation: 3358

Unfortunately, there are no ops that do exactly the same thing for allclose or isclose, but you can have workarounds.

isclose: combine tf.abs, tf.sub, tf.less or tf.less_equal.

allclose: based on isclose, use tf.reduce_all in addition

all: use tf.reduce_all

any: use tf.reduce_any

Upvotes: 3

Related Questions