mirror of
https://github.com/marian-nmt/marian.git
synced 2024-10-05 19:17:10 +03:00
Fixed some warnings on clang 15 that are promoted into errors (#936)
This commit is contained in:
parent
f9a1ed10ce
commit
6250cd88bb
@ -130,7 +130,7 @@ namespace marian {
|
||||
// @TODO: add checks for empty factor groups until it stops crashing (training already works; decoder still crashes)
|
||||
|
||||
io::InputFileStream in(modelPath);
|
||||
for (WordIndex v = 0; io::getline(in, line); v++) {
|
||||
for(; io::getline(in, line);) {
|
||||
utils::splitAny(line, tokBuf, " \t");
|
||||
factorMapTokenized.push_back(tokBuf);
|
||||
}
|
||||
|
@ -221,7 +221,6 @@ private:
|
||||
}
|
||||
|
||||
void prune(float threshold = 0.f) {
|
||||
size_t i = 0;
|
||||
for(auto& probs : data_) {
|
||||
std::vector<std::pair<float, WordIndex>> sorter;
|
||||
for(auto& it : probs)
|
||||
@ -237,8 +236,6 @@ private:
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,6 @@ private:
|
||||
int totalSize = (int)graphs_[0]->params()->vals()->size();
|
||||
int shardSize = (int)ceil(totalSize / (float)graphs_.size());
|
||||
|
||||
int pos = 0;
|
||||
for(auto graph : graphs_) {
|
||||
int __size__ = std::min(shardSize, totalSize);
|
||||
|
||||
@ -145,7 +144,6 @@ private:
|
||||
tmpTensors_.push_back(tmp);
|
||||
|
||||
// move to next shard
|
||||
pos += __size__;
|
||||
totalSize -= __size__;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user