diff options
author | philblunsom <philblunsom@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-19 18:33:29 +0000 |
---|---|---|
committer | philblunsom <philblunsom@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-19 18:33:29 +0000 |
commit | 0e4d1fc42b5f3707d81549d11fad8fcd4f9af89f (patch) | |
tree | 3e29ca6353b9eb8c48a7d47fc1f0aff70932260b /gi/pyp-topics/src/pyp-topics.cc | |
parent | 1eb8cf39863b166e87a3115c682e873dbe091582 (diff) |
Vaguely working distributed implementation. Hierarchical topics doesn't yet work correctly.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@317 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/pyp-topics/src/pyp-topics.cc')
-rw-r--r-- | gi/pyp-topics/src/pyp-topics.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gi/pyp-topics/src/pyp-topics.cc b/gi/pyp-topics/src/pyp-topics.cc index b154f922..06499291 100644 --- a/gi/pyp-topics/src/pyp-topics.cc +++ b/gi/pyp-topics/src/pyp-topics.cc @@ -200,7 +200,7 @@ void PYPTopics::sample_corpus(const Corpus& corpus, int samples, } if (m_use_topic_pyp) { - m_topic_pyp.resample_prior(); + m_topic_pyp.resample_prior(rnd); log_p += m_topic_pyp.log_restaurant_prob(); } @@ -233,7 +233,7 @@ PYPTopics::F PYPTopics::hresample_docs(int start, int end) assert(start <= end); for (int i=start; i < end; ++i) { - m_document_pyps[i].resample_prior(); + m_document_pyps[i].resample_prior(rnd); log_p += m_document_pyps[i].log_restaurant_prob(); if (resample_counter++ % 5000 == 0) { std::cerr << "."; std::cerr.flush(); @@ -250,7 +250,7 @@ PYPTopics::F PYPTopics::hresample_topics() for (PYPs::iterator pypIt=levelIt->begin(); pypIt != levelIt->end(); ++pypIt) { - pypIt->resample_prior(); + pypIt->resample_prior(rnd); log_p += pypIt->log_restaurant_prob(); } } |