Skip to content

Commit ea17a0c

Browse files
committed
update single_seq_fn
1 parent 8b6f439 commit ea17a0c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

rasa/utils/tensorflow/crf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,7 @@ def crf_decode(
154154
# argmax tag and the max activation.
155155
def _single_seq_fn():
156156
decode_tags = tf.cast(tf.argmax(potentials, axis=2), dtype=tf.int32)
157-
decode_scores = tf.reshape(
158-
tf.reduce_max(tf.nn.softmax(potentials, axis=2), axis=2), shape=[-1]
159-
)
157+
decode_scores = tf.reduce_max(tf.nn.softmax(potentials, axis=2), axis=2)
160158
best_score = tf.reshape(tf.reduce_max(potentials, axis=2), shape=[-1])
161159
return decode_tags, decode_scores, best_score
162160

0 commit comments

Comments
 (0)