move nextStates into Decode()

This commit is contained in:
Hieu Hoang 2017-02-08 02:01:21 +00:00
parent ed7d182dd4
commit a72543bdf1
2 changed files with 2 additions and 4 deletions

View File

@ -61,12 +61,12 @@ void Search::Decode(
const God &god,
const Sentences& sentences,
States &states,
States &nextStates,
std::shared_ptr<Histories> &histories,
Beam &prevHyps)
{
size_t batchSize = sentences.size();
States nextStates = NewStates();
size_t batchSize = sentences.size();
std::vector<size_t> beamSizes(batchSize, 1);
for (size_t decoderStep = 0; decoderStep < 3 * sentences.GetMaxLength(); ++decoderStep) {
@ -128,7 +128,6 @@ std::shared_ptr<Histories> Search::Process(const God &god, const Sentences& sent
Beam prevHyps(batchSize, HypothesisPtr(new Hypothesis()));
States states = NewStates();
States nextStates = NewStates();
// calc
PreProcess(god, sentences, histories, prevHyps);

View File

@ -30,7 +30,6 @@ class Search {
const God &god,
const Sentences& sentences,
States &states,
States &nextStates,
std::shared_ptr<Histories> &histories,
Beam &prevHyps);