Commit 332e07f
authored
Update nearest_neighbours.py for weights=distance
The Mul operator created in line 141 converts distances (node[0]) from OnnxTopK_11 to negative values. The Mul operator is followed by a Max operator, which turns any negative value to 1e-6, so distances lose their effect in the downstream operation. I think this Mul operator should be removed, and node[0] can be connected to the Max operator directly.
Signed-off-by: yishiouchen <[email protected]>1 parent 153328a commit 332e07f
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
0 commit comments