mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
[js/web][bugfix] fix negative axes for unsqueeze (#11944)
[js/web] fix negative axes for unsqueeze
This commit is contained in:
parent
9be2b6046b
commit
0702364d7a
1 changed files with 1 additions and 1 deletions
|
|
@ -791,7 +791,7 @@ export class ShapeUtil {
|
|||
|
||||
// set all axes indices to 1 in outputDims and check for duplicates
|
||||
for (let i = 0; i < axes.length; i++) {
|
||||
const axis = ShapeUtil.normalizeAxis(axes[i], dims.length);
|
||||
const axis = ShapeUtil.normalizeAxis(axes[i], outputDims.length);
|
||||
if (axis >= outputDims.length) {
|
||||
throw new Error('\'axes\' has an out of range axis');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue