diff --git a/tensorflow_addons/text/crf.py b/tensorflow_addons/text/crf.py index 3820b08a94..b6d0d99b84 100644 --- a/tensorflow_addons/text/crf.py +++ b/tensorflow_addons/text/crf.py @@ -582,7 +582,7 @@ def _multi_seq_fn(): best_score = tf.reduce_max(last_score, axis=1) return decode_tags, best_score - if potentials.shape[1] is not None: + if potentials.shape[1].value is not None: # shape is statically know, so we just execute # the appropriate code path if potentials.shape[1] == 1: