Skip to content

Commit d1ad791

Browse files
choich08365Changhwan Choi
andauthored
[Tools] Modified MlResponse numInputNodes check: usage of dynamic input (#17069)
Co-authored-by: Changhwan Choi <changhwan.choi@cern.ch>
1 parent 8803236 commit d1ad791

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)