mirror of
https://github.com/marian-nmt/marian.git
synced 2024-11-03 20:13:47 +03:00
init vector
This commit is contained in:
parent
6981b21f4e
commit
395a4f94d0
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user