Open Lanme opened 5 years ago
Just modify the function decode() in decode.py and remove the batcher
in __init__
Example:
def decode(self, article):
example = Example(article, [], self._vocab)
b = [example for _ in range(self.batch_size)]
batch = Batch(b, self._vocab, self.batch_size)
# Run beam search to get best Hypothesis
best_summary = self.beam_search(batch)
......
Just modify the function decode() in decode.py and remove the
batcher
in__init__
Example:def decode(self, article): example = Example(article, [], self._vocab) b = [example for _ in range(self.batch_size)] batch = Batch(b, self._vocab, self.batch_size) # Run beam search to get best Hypothesis best_summary = self.beam_search(batch) ......
hello,Can you share the changed code?
Hi, have you being sucessful in predict the single line, i am recently working on my graduation project which requiring a display system of automatic summarization.
I have trained model for chinese weibo data ,how could i predict single line?