Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHieu Hoang <hihoan@microsoft.com>2021-06-16 04:08:45 +0300
committerHieu Hoang <hihoan@microsoft.com>2021-06-16 04:08:45 +0300
commit395a4f94d0d3182600d22203625bd1be1f8a042b (patch)
tree6ca47f52bbfc3f95bb115a006bb948e287deaf00 /src
parent6981b21f4e14d8be10a7e3011bc4d93afa00add0 (diff)
init vector
Diffstat (limited to 'src')
-rw-r--r--src/data/factored_vocab.cpp2
-rw-r--r--src/data/shortlist.cpp2
-rwxr-xr-xsrc/tensors/cpu/prod.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/data/factored_vocab.cpp b/src/data/factored_vocab.cpp
index e68fb5c9..e26a8479 100644
--- a/src/data/factored_vocab.cpp
+++ b/src/data/factored_vocab.cpp
@@ -265,7 +265,7 @@ void FactoredVocab::constructGroupInfoFromFactorVocab() {
}
// determine group index ranges
groupRanges_.resize(numGroups, { SIZE_MAX, (size_t)0 });
- std::vector<int> groupCounts(numGroups); // number of group members
+ std::vector<int> groupCounts(numGroups, 0); // number of group members
for (WordIndex u = 0; u < factorVocabSize; u++) { // determine ranges; these must be non-overlapping, verified via groupCounts
auto g = factorGroups_[u];
if (groupRanges_[g].first > u)
diff --git a/src/data/shortlist.cpp b/src/data/shortlist.cpp
index 36e2d22f..9943198b 100644
--- a/src/data/shortlist.cpp
+++ b/src/data/shortlist.cpp
@@ -83,7 +83,7 @@ Ptr<faiss::IndexLSH> LSHShortlist::index_;
LSHShortlist::LSHShortlist(int k, int nbits, size_t lemmaSize)
: Shortlist(std::vector<WordIndex>())
, k_(k), nbits_(nbits), lemmaSize_(lemmaSize) {
- //std::cerr << "LSHShortlist" << std::endl;
+ std::cerr << "LSHShortlist lemmaSize_=" << lemmaSize_ << std::endl;
/*
for (int i = 0; i < k_; ++i) {
indices_.push_back(i);
diff --git a/src/tensors/cpu/prod.cpp b/src/tensors/cpu/prod.cpp
index 07cc2b99..313e6fbd 100755
--- a/src/tensors/cpu/prod.cpp
+++ b/src/tensors/cpu/prod.cpp
@@ -184,7 +184,7 @@ void ProdBatched(marian::Tensor C,
// This loop initializes the array pointers in the same way as the for loop
// in the normal sgemm version a few lines below
functional::Array<int, functional::Shape::size()> dims;
- for(size_t i = 0; i < batchC; ++i) {
+ for(int i = 0; i < batchC; ++i) {
cShapeMetaF.dims(i, dims);
auto aIndex = aShapeMetaF.bindex(dims);
auto bIndex = bShapeMetaF.bindex(dims);