Skip to content

Commit

Permalink
Merge pull request #117 from yueshuangyan/master
Browse files Browse the repository at this point in the history
style: change notes
  • Loading branch information
yueshuangyan authored Apr 1, 2021
2 parents d113fcb + 08db463 commit 1d27570
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/paddlejs-core/src/opFactory/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,18 @@ export function formatShape(shape: number[]): number[] {
}

/**
* tensor shape 标准化为 4维
* @param {Array} shape tensor的形状
* @returns {Array} 4维 shape
* calculate total length of shape
* @param {Array} shape shape of tensor
* @returns {number} total length of shape
*/
export function accShape(shape: number[]): number {
return shape.reduce((all, num) => all * num);
}

/**
* tensor shape 标准化为 4维
* @param {Array} shape tensor的形状
* @returns {Array} 4维 shape
* calculate real axis
* @param {Array} shape shape of tensor
* @returns {number} real axis after shape format to 4D
*/
export function formatAxis(shape: number[], axis): number {
const shapeLen = shape.length;
Expand Down

0 comments on commit 1d27570

Please sign in to comment.