diff --git a/tensorflow/contrib/seq2seq/python/ops/attention_wrapper.py b/tensorflow/contrib/seq2seq/python/ops/attention_wrapper.py index 9fc548aabe3..a0f1775257d 100644 --- a/tensorflow/contrib/seq2seq/python/ops/attention_wrapper.py +++ b/tensorflow/contrib/seq2seq/python/ops/attention_wrapper.py @@ -497,7 +497,7 @@ class AttentionWrapper(core_rnn_cell.RNNCell): if probability_fn is None: probability_fn = nn_ops.softmax else: - if not callable(cell_input_fn): + if not callable(probability_fn): raise TypeError( "probability_fn must be callable, saw type: %s" % type(probability_fn).__name__)