Skip to content

Commit 1fe67ec

Browse files
author
Changhwan Choi
committed
Modified MlResponse numInputNodes check: usage of dynamic input (numInputNodes=-1)
1 parent ed2a819 commit 1fe67ec

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Tools/ML/MlResponse.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ class MlResponse
185185
const int numInputNodes = mModels[nModel].getNumInputNodes();
186186
const int numInputFeatures = static_cast<int>(input.size());
187187

188-
if (numInputNodes != numInputFeatures) {
188+
// Check that the number of input nodes in the model is equal to the number of input features, except for the case where the model input is dynamic (numInputNodes == -1)
189+
if (numInputNodes != numInputFeatures && numInputNodes >= 0) {
189190
LOG(fatal) << "Number of input nodes in the model " << mPaths[nModel] << " is different from the number of input features to be tested (" << numInputNodes << " vs " << numInputFeatures << ")";
190191
}
191192

0 commit comments

Comments
 (0)