[GNA] fix custom scale factors when importing a model (#1096)
This commit is contained in:
parent
0f1c8a0763
commit
0b9987f5e9
@ -603,12 +603,13 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
if (FLAGS_q.compare("user") == 0) {
|
||||
auto scaleFactorInput = ParseScaleFactors(FLAGS_sf);
|
||||
if (scaleFactorInput.size() != network.getInputsInfo().size()) {
|
||||
if (numInputArkFiles != scaleFactorInput.size()) {
|
||||
std::string errMessage("Incorrect command line for multiple inputs: "
|
||||
+ std::to_string(scaleFactorInput.size()) + " scale factors provided for "
|
||||
+ std::to_string(network.getInputsInfo().size()) + " inputs.");
|
||||
+ std::to_string(scaleFactorInput.size()) + " scale factors provided for "
|
||||
+ std::to_string(numInputArkFiles) + " input files.");
|
||||
throw std::logic_error(errMessage);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < scaleFactorInput.size(); ++i) {
|
||||
slog::info << "For input " << i << " using scale factor of " << scaleFactorInput[i] << slog::endl;
|
||||
std::string scaleFactorConfigKey = GNA_CONFIG_KEY(SCALE_FACTOR) + std::string("_") + std::to_string(i);
|
||||
|
Loading…
Reference in New Issue
Block a user