[ONNX] Do not generate values for constants. (#1272)

* Do not generate values for constants.

* Add an onnx based example using squeezenet.
This commit is contained in:
Laurent Mazare
2023-11-05 11:23:14 +01:00
committed by GitHub
parent d1d89bac1f
commit 928a9d906e
5 changed files with 106 additions and 37 deletions

View File

@ -382,7 +382,7 @@ pub fn simple_eval(
Some([p]) => *p as usize,
Some([p1, p2, p3, p4]) => {
if p1 != p2 || p1 != p3 || p1 != p4 {
bail!("pads to be the same {pads:?} {}", node.name)
bail!("pads have to be the same {pads:?} {}", node.name)
}
*p1 as usize
}
@ -396,7 +396,7 @@ pub fn simple_eval(
Some([p1, p2]) => {
if p1 != p2 {
bail!(
"strides to be the same on both axis {pads:?} {}",
"strides have to be the same on both axis {pads:?} {}",
node.name
)
}
@ -412,7 +412,7 @@ pub fn simple_eval(
Some([p1, p2]) => {
if p1 != p2 {
bail!(
"dilations to be the same on both axis {pads:?} {}",
"dilations have to be the same on both axis {pads:?} {}",
node.name
)
}