Skip to content

Commit

Permalink
Improve DataTypeError message with parametrized dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
Abioy committed Mar 5, 2024
1 parent acfb490 commit cd2f982
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wonnx/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,11 @@ impl ValueInfoProto {
.get_shape()
.get_dim()
.iter()
.map(|x| {
.enumerate()
.map(|(idx, x)| {
if x.has_dim_param() {
return Err(DataTypeError::ParametrizedDimensionUnsupported(
x.get_dim_param().to_string(),
self.get_name().to_string() + "#" + &idx.to_string(),
));
}
Ok(x.get_dim_value())
Expand Down

0 comments on commit cd2f982

Please sign in to comment.