From 1fe67eccea0a5f082b5955254a7e5566d6df2880 Mon Sep 17 00:00:00 2001 From: Changhwan Choi Date: Wed, 15 Jul 2026 11:05:58 +0900 Subject: [PATCH] Modified MlResponse numInputNodes check: usage of dynamic input (numInputNodes=-1) --- Tools/ML/MlResponse.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tools/ML/MlResponse.h b/Tools/ML/MlResponse.h index da75eff66e1..508d39123f5 100644 --- a/Tools/ML/MlResponse.h +++ b/Tools/ML/MlResponse.h @@ -185,7 +185,8 @@ class MlResponse const int numInputNodes = mModels[nModel].getNumInputNodes(); const int numInputFeatures = static_cast(input.size()); - if (numInputNodes != numInputFeatures) { + // 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) + if (numInputNodes != numInputFeatures && numInputNodes >= 0) { 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 << ")"; }