Skip to content

Commit

Permalink
Address comments. Improve diagnostics in GetImmediateShapeTensor()
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayakdsci committed Sep 23, 2024
1 parent ffa6f2e commit 62e0867
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1015,8 +1015,11 @@ Status NodeImporter::GetImmediateShapeTensor(const std::string &name,
const onnx::TensorProto *tensor =
graph_info_.graph_viewer().GetConstantInitializer(name, false);
if (!tensor) {
return SetError(
"Could not find immediate shape tensor in graph initializers");
std::string msg = "Could not find the immediate shape tensor ";
msg.append(name);
msg.append(" in constant graph initializers. It was possibly produced "
"dynamically.");
return SetError(msg);
}
const onnx::TensorProto &tp = *tensor;

Expand Down

0 comments on commit 62e0867

Please sign in to comment.