Commit d34a524
committed
Fix test_approx() when one of the arguments is a broadcasted multidimensional array.
`collect()` on broadcasted arrays doesn't preserve its shape, but instead creates a flat array. This breaks tests e.g. for most activation functions in NNlib:
```
test_rrule(Broadcast.broadcasted, NNlib.σ, rand(3, 4))
```1 parent e30fcb4 commit d34a524
2 files changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | | - | |
| 145 | + | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
0 commit comments