Skip to content

Commit cc621dc

Browse files
authored
make cutout op compatible with non eager mode (#2190)
cutout op is not compatible with non eager mode, this is a fix
1 parent 07ed7ac commit cc621dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensorflow_addons/image/cutout_ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def cutout(
189189
mask_4d = tf.expand_dims(masks.stack(), 1)
190190
mask = tf.tile(mask_4d, [1, tf.shape(images)[1], 1, 1])
191191
images = tf.where(
192-
mask == 0,
192+
tf.equal(mask, 0),
193193
tf.ones_like(images, dtype=images.dtype) * constant_values,
194194
images,
195195
)

0 commit comments

Comments
 (0)