Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Tools/ML/MlResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,13 @@ class MlResponse
void init(bool enableOptimizations = false, int threads = 0)
{
uint8_t counterModel{0};
const int numCachedIndices = static_cast<int>(mCachedIndices.size());
for (const auto& path : mPaths) {
mModels[counterModel].initModel(path, enableOptimizations, threads);
const int numInputNodes = mModels[counterModel].getNumInputNodes();
if (numInputNodes != numCachedIndices) {
LOG(fatal) << "Number of input nodes in the model " << path << " is different from the number of input features indices (" << numInputNodes << " vs " << numCachedIndices << ")";
}
Comment thread
vkucera marked this conversation as resolved.
++counterModel;
}
}
Expand Down
Loading