Commit 78925bf
Fix default attribute values in shape inference (onnx#7602)
This is an attempt to fix onnx#7573
When using the default value for an attribute, there are two separate
scenarios:
* The attribute is not present
* The attribute is present but the numerical value for the attribute is
not set
The previous logic was using the schema default in both cases, but in
the second case one should use the protobuf default for the relevant
data type instead.
This change fixes the example reported in the issue.
---------
Signed-off-by: Matteo Salvarezza <matteos@wolfram.com>
Co-authored-by: Matteo Salvarezza <matteos@wolfram.com>
Co-authored-by: Andreas Fehlner <fehlner@arcor.de>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>1 parent ee910d0 commit 78925bf
2 files changed
+68
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
165 | 168 | | |
166 | 169 | | |
167 | 170 | | |
168 | 171 | | |
169 | 172 | | |
170 | 173 | | |
171 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
172 | 178 | | |
173 | 179 | | |
174 | 180 | | |
175 | 181 | | |
176 | 182 | | |
177 | 183 | | |
178 | 184 | | |
179 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
180 | 189 | | |
181 | 190 | | |
182 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
10855 | 10856 | | |
10856 | 10857 | | |
10857 | 10858 | | |
| 10859 | + | |
| 10860 | + | |
| 10861 | + | |
| 10862 | + | |
| 10863 | + | |
| 10864 | + | |
| 10865 | + | |
| 10866 | + | |
| 10867 | + | |
| 10868 | + | |
| 10869 | + | |
| 10870 | + | |
| 10871 | + | |
| 10872 | + | |
| 10873 | + | |
| 10874 | + | |
| 10875 | + | |
| 10876 | + | |
| 10877 | + | |
| 10878 | + | |
| 10879 | + | |
| 10880 | + | |
| 10881 | + | |
| 10882 | + | |
| 10883 | + | |
| 10884 | + | |
| 10885 | + | |
| 10886 | + | |
| 10887 | + | |
| 10888 | + | |
| 10889 | + | |
| 10890 | + | |
| 10891 | + | |
| 10892 | + | |
| 10893 | + | |
| 10894 | + | |
| 10895 | + | |
| 10896 | + | |
| 10897 | + | |
| 10898 | + | |
| 10899 | + | |
| 10900 | + | |
| 10901 | + | |
| 10902 | + | |
| 10903 | + | |
| 10904 | + | |
| 10905 | + | |
| 10906 | + | |
| 10907 | + | |
| 10908 | + | |
| 10909 | + | |
| 10910 | + | |
| 10911 | + | |
| 10912 | + | |
| 10913 | + | |
10858 | 10914 | | |
10859 | 10915 | | |
10860 | 10916 | | |
| |||
0 commit comments