You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jo...@apache.org on 2018/05/30 10:20:15 UTC
[opennlp-sandbox] branch master updated: Adjust operation names to
namefinder.py
This is an automated email from the ASF dual-hosted git repository.
joern 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 bd30e1a Adjust operation names to namefinder.py
bd30e1a is described below
commit bd30e1a19e13e9677762b7cb4915c83e4feb9b17
Author: Jörn Kottmann <jo...@apache.org>
AuthorDate: Wed May 30 12:11:30 2018 +0200
Adjust operation names to namefinder.py
---
.../opennlp/tf/guillaumegenthial/SequenceTagging.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tf-ner-poc/src/main/java/org/apache/opennlp/tf/guillaumegenthial/SequenceTagging.java b/tf-ner-poc/src/main/java/org/apache/opennlp/tf/guillaumegenthial/SequenceTagging.java
index 653b58a..637ccec 100644
--- a/tf-ner-poc/src/main/java/org/apache/opennlp/tf/guillaumegenthial/SequenceTagging.java
+++ b/tf-ner-poc/src/main/java/org/apache/opennlp/tf/guillaumegenthial/SequenceTagging.java
@@ -61,15 +61,15 @@ public class SequenceTagging implements AutoCloseable {
FeedDictionary fd = FeedDictionary.create(tokenIds);
List<Tensor<?>> run = session.runner()
- .feed("char_ids:0", fd.getCharIdsTensor())
- .feed("dropout:0", fd.getDropoutTensor())
- .feed("sequence_lengths:0", fd.getSentenceLengthsTensor())
- .feed("word_ids:0", fd.getWordIdsTensor())
- .feed("word_lengths:0", fd.getWordLengthsTensor())
- .fetch("proj/logits", 0)
+ .feed("chars/char_ids:0", fd.getCharIdsTensor())
+ // TODO: missing in the python code ...
+ //.feed("dropout:0", fd.getDropoutTensor())
+ .feed("words/sequence_lengths:0", fd.getSentenceLengthsTensor())
+ .feed("words/word_ids:0", fd.getWordIdsTensor())
+ .feed("chars/word_lengths:0", fd.getWordLengthsTensor())
+ .fetch("logits", 0)
.fetch("trans_params", 0).run();
-
float[][][] logits = new float[fd.getNumberOfSentences()][fd.getMaxSentenceLength()][indexTagger.getNumberOfTags()];
run.get(0).copyTo(logits);
--
To stop receiving notification emails like this one, please contact
joern@apache.org.