Update error message for "allow_nonexistent_arrays".

This flag doesn't exist in the public interface, and the team considers hitting this message to be a bug that should be fixed.

PiperOrigin-RevId: 239634541
This commit is contained in:
Mark Daoust 2019-03-21 11:20:40 -07:00 committed by TensorFlower Gardener
parent 7cbe0bd27b
commit 90085135c2
2 changed files with 4 additions and 4 deletions

View File

@ -63,8 +63,7 @@ TEST(TocoTest, BadOutputArray) {
EXPECT_DEATH(Convert(input, toco_flags, model_flags, &output).ok(), EXPECT_DEATH(Convert(input, toco_flags, model_flags, &output).ok(),
"Specified output array .output1. is not produced by any op " "Specified output array .output1. is not produced by any op "
"in this graph. Is it a typo. To silence this message, pass " "in this graph. Is it a typo");
"this flag: allow_nonexistent_arrays");
} }
TEST(TocoTest, BadOutputFormat) { TEST(TocoTest, BadOutputFormat) {

View File

@ -904,8 +904,9 @@ void CheckNonExistentIOArrays(const Model& model) {
return; return;
} }
static constexpr char general_comment[] = static constexpr char general_comment[] =
"Is it a typo? To silence this message, pass this flag: " "Is it a typo? This should not happen. If you trigger this error "
"allow_nonexistent_arrays"; "please send a bug report (with code to reporduce this error), to the "
"TensorFlow Lite team.";
for (const string& output_array : model.flags.output_arrays()) { for (const string& output_array : model.flags.output_arrays()) {
if (IsConstantParameterArray(model, output_array)) { if (IsConstantParameterArray(model, output_array)) {
continue; // It is OK to request that a constant be an output. continue; // It is OK to request that a constant be an output.