Skip to content

Commit

Permalink
Deploying to gh-pages from @ 2e28fac 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
Honry committed Feb 27, 2024
1 parent aaa9ff1 commit f3c2c9e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion face_recognition/facenet_nchw.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,10 @@ export class FaceNetNchw {
block8_5, 6, ['977', '1104', '978', '1080', '1086'], false);

const averagePool = this.builder_.averagePool2d(block8_6);
const squeeze = this.builder_.squeeze(averagePool, {axes: [2, 3]});
// Use reshape to implement squeeze(averagePool, {axes: [2, 3]});
const squeezed_shape = averagePool.shape();
squeezed_shape.splice(2, 2);
const squeeze = this.builder_.reshape(averagePool, squeezed_shape);
const gemm = await this.buildGemm_(squeeze);
// L2Normalization will be handled in post-processing
return gemm;
Expand Down

0 comments on commit f3c2c9e

Please sign in to comment.