This is an automated email from the ASF dual-hosted git repository.

tommaso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/opennlp-sandbox.git


The following commit(s) were added to refs/heads/master by this push:
     new 54f10a3  trivial update of lstm cell construct used
     new 7b6e85d  Merge pull request #26 from tteofili/lstm-update
54f10a3 is described below

commit 54f10a385f8f02bf0f09fd4a0cc429b653d28242
Author: Tommaso Teofili <[email protected]>
AuthorDate: Fri Feb 1 15:11:20 2019 +0100

    trivial update of lstm cell construct used
---
 tf-ner-poc/src/main/python/normalizer/normalizer.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tf-ner-poc/src/main/python/normalizer/normalizer.py 
b/tf-ner-poc/src/main/python/normalizer/normalizer.py
index e720cc1..bc2c6ac 100644
--- a/tf-ner-poc/src/main/python/normalizer/normalizer.py
+++ b/tf-ner-poc/src/main/python/normalizer/normalizer.py
@@ -97,7 +97,7 @@ def create_graph(mode, batch_size, encoder_nchars, 
max_target_length, decoder_nc
 
     encoder_emb_inp = tf.transpose(encoder_emb_inp, perm=[1, 0, 2])
 
-    encoder_cell = tf.nn.rnn_cell.BasicLSTMCell(num_units)
+    encoder_cell = tf.nn.rnn_cell.LSTMCell(num_units)
     initial_state = encoder_cell.zero_state(batch_size_ph, dtype=tf.float32)
 
     encoder_outputs, encoder_state = tf.nn.dynamic_rnn(
@@ -123,7 +123,7 @@ def create_graph(mode, batch_size, encoder_nchars, 
max_target_length, decoder_nc
         num_units, attention_states,
         memory_sequence_length=encoder_lengths_ph)
 
-    decoder_cell = tf.nn.rnn_cell.BasicLSTMCell(num_units)
+    decoder_cell = tf.nn.rnn_cell.LSTMCell(num_units)
 
     decoder_cell = tf.contrib.seq2seq.AttentionWrapper(decoder_cell, 
attention_mechanism,
         attention_layer_size=num_units)

Reply via email to