Update tensorflow/compiler/mlir/tensorflow/translate/import_model.cc

Co-authored-by: Mihai Maruseac <mihai.maruseac@gmail.com>
This commit is contained in:
tg-at-google 2020-07-28 16:17:29 -04:00 committed by GitHub
parent 6142a27972
commit 20eeb11ee0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2387,8 +2387,8 @@ GraphDefImporter::GetArgsRetsAndTypesFromFunctionGraph(
"' is missing attribute 'index'");
auto index = attr->i();
const int nodes_size = nodes->size();
if (nodes_size < index + 1) nodes->resize(index + 1);
const int num_nodes = nodes->size();
if (num_nodes < index + 1) nodes->resize(index + 1);
if ((*nodes)[index].node != nullptr)
return errors::InvalidArgument(node->type_string(), " node '",