Master branch was updated with a new commit that needs casting
@@ -425,10 +425,10 @@ def fgm(x,
# If a data range was specified, check that the input was in that range
if clip_min is not None:
- asserts.append(utils_tf.assert_greater_equal(x, clip_min))
+ asserts.append(utils_tf.assert_greater_equal(x, tf.cast(clip_min, x.dtype)))
if clip_max is not None:
- asserts.append(utils_tf.assert_less_equal(x, clip_max))
+ asserts.append(utils_tf.assert_less_equal(x, tf.cast(clip_max, x.dtype)))
# Make sure the caller has not passed probs by accident
assert logits.op.type != 'Softmax'
