Commit e49dd03
authored
Use ONNX / Core ML compatible method to broadcast (huggingface#310)
* Use ONNX / Core ML compatible method to broadcast.
Unfortunately `tile` could not be used either, it's still not compatible
with ONNX.
See huggingface#284.
* Add comment about why broadcast_to is not used.
Also, apply style to changed files.
* Make sure broadcast remains in same device.1 parent 7b628a2 commit e49dd03
2 files changed
+4
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | 123 | | |
125 | 124 | | |
126 | 125 | | |
| |||
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
135 | | - | |
136 | | - | |
| 134 | + | |
| 135 | + | |
137 | 136 | | |
138 | 137 | | |
139 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
| |||
133 | 132 | | |
134 | 133 | | |
135 | 134 | | |
136 | | - | |
137 | | - | |
| 135 | + | |
| 136 | + | |
138 | 137 | | |
139 | 138 | | |
140 | 139 | | |
| |||
145 | 144 | | |
146 | 145 | | |
147 | 146 | | |
148 | | - | |
149 | 147 | | |
150 | 148 | | |
151 | 149 | | |
| |||
160 | 158 | | |
161 | 159 | | |
162 | 160 | | |
163 | | - | |
164 | 161 | | |
165 | 162 | | |
166 | 163 | | |
| |||
0 commit comments