Skip to content

Commit

Permalink
Revert "ShapeUtis.size should return 0 if the tensor dims is empty in…
Browse files Browse the repository at this point in the history
…stead of 1."

This reverts commit d8aeee1.
  • Loading branch information
satyajandhyala committed Aug 18, 2024
1 parent d8aeee1 commit 7520dc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/web/lib/wasm/jsep/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class ShapeUtil {
* calculate the size (number of elements)
*/
static size(dims: readonly number[]): number {
return dims.length > 0 ? ShapeUtil.getSizeFromDimensionRange(dims, 0, dims.length) : 0;
return ShapeUtil.getSizeFromDimensionRange(dims, 0, dims.length);
}

/**
Expand Down

0 comments on commit 7520dc2

Please sign in to comment.