aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/crf
diff options
context:
space:
mode:
authorGravatar Jianwei Xie <xiejw@google.com>2016-12-07 16:54:18 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-12-07 17:03:23 -0800
commit5e96fa748d0d4c15b262c57bbbbcd417b1f71a10 (patch)
treed4434bf11e800a4a05aa0ae2c3b896c4c4a58638 /tensorflow/contrib/crf
parent3e1124995ca297c9bd1da943e5da8f13609a8e15 (diff)
Import tf.contrib.rnn for cells instead of tf.nn.rnn_cell.
Change: 141376440
Diffstat (limited to 'tensorflow/contrib/crf')
-rw-r--r--tensorflow/contrib/crf/python/ops/crf.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/contrib/crf/python/ops/crf.py b/tensorflow/contrib/crf/python/ops/crf.py
index dc8ab1407b..3e9d705e74 100644
--- a/tensorflow/contrib/crf/python/ops/crf.py
+++ b/tensorflow/contrib/crf/python/ops/crf.py
@@ -41,11 +41,11 @@ from __future__ import print_function
import numpy as np
+from tensorflow.contrib import rnn as contrib_rnn
from tensorflow.python.framework import dtypes
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import math_ops
from tensorflow.python.ops import rnn
-from tensorflow.python.ops import rnn_cell
from tensorflow.python.ops import variable_scope as vs
__all__ = ["crf_sequence_score", "crf_log_norm", "crf_log_likelihood",
@@ -224,7 +224,7 @@ def crf_binary_score(tag_indices, sequence_lengths, transition_params):
return binary_scores
-class CrfForwardRnnCell(rnn_cell.RNNCell):
+class CrfForwardRnnCell(contrib_rnn.RNNCell):
"""Computes the alpha values in a linear-chain CRF.
See http://www.cs.columbia.edu/~mcollins/fb.pdf for reference.