aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/crf
diff options
context:
space:
mode:
authorGravatar Yifei Feng <yifeif@google.com>2018-02-22 14:24:57 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-02-22 14:29:27 -0800
commitdce9a49c19f406ba45919e8c94474e55dc5ccd54 (patch)
tree928db8a52603e00aef76985cda16b8bceb9debb2 /tensorflow/contrib/crf
parentcb7e1963c625fd9713e7475d85621f95be6762f1 (diff)
Merge changes from github.
PiperOrigin-RevId: 186674197
Diffstat (limited to 'tensorflow/contrib/crf')
-rw-r--r--tensorflow/contrib/crf/python/ops/crf.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tensorflow/contrib/crf/python/ops/crf.py b/tensorflow/contrib/crf/python/ops/crf.py
index faa78769b9..1233c8f251 100644
--- a/tensorflow/contrib/crf/python/ops/crf.py
+++ b/tensorflow/contrib/crf/python/ops/crf.py
@@ -105,8 +105,8 @@ def crf_sequence_score(inputs, tag_indices, sequence_lengths,
return utils.smart_cond(
pred=math_ops.equal(inputs.shape[1].value or array_ops.shape(inputs)[1],
1),
- fn1=_single_seq_fn,
- fn2=_multi_seq_fn)
+ true_fn=_single_seq_fn,
+ false_fn=_multi_seq_fn)
def crf_log_norm(inputs, sequence_lengths, transition_params):
@@ -511,7 +511,7 @@ def crf_decode(potentials, transition_params, sequence_length):
return decode_tags, best_score
return utils.smart_cond(
- pred=math_ops.equal(
- potentials.shape[1].value or array_ops.shape(potentials)[1], 1),
- fn1=_single_seq_fn,
- fn2=_multi_seq_fn)
+ pred=math_ops.equal(potentials.shape[1].value or
+ array_ops.shape(potentials)[1], 1),
+ true_fn=_single_seq_fn,
+ false_fn=_multi_seq_fn)