Skip to content

Commit

Permalink
Merge pull request #202 from Abioy/master
Browse files Browse the repository at this point in the history
Improve `DataTypeError` message with `parametrized dimension`
  • Loading branch information
pixelspark authored Mar 5, 2024
2 parents acfb490 + cd2f982 commit 7880ed8
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 7880ed8

Please sign in to comment.