Skip to content

Commit 9ac0836

Browse files
authored
Fixed bug in options.activation (#183)
Avoid reusing options object across ops.
1 parent 83737be commit 9ac0836

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

image_classification/mobilenet_nhwc.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,13 @@ export class MobileNetV2Nhwc {
5050

5151
dwiseOptions.autoPad = autoPad;
5252
dwiseOptions.filterLayout = 'ihwo';
53-
const convOptions = {autoPad, filterLayout: 'ohwi'};
5453

5554
const conv1x1Relu6 = await this.buildConv_(
56-
input, weightsNameArray[0], `${biasPrefix}_expand_Conv2D`, true, convOptions);
55+
input, weightsNameArray[0], `${biasPrefix}_expand_Conv2D`, true, {autoPad, filterLayout: 'ohwi'});
5756
const dwise3x3Relu6 = await this.buildConv_(
5857
conv1x1Relu6, weightsNameArray[1], `${biasPrefix}_depthwise_depthwise`, true, dwiseOptions);
5958
const conv1x1Linear = await this.buildConv_(
60-
dwise3x3Relu6, weightsNameArray[2], `${biasPrefix}_project_Conv2D`, false, convOptions);
59+
dwise3x3Relu6, weightsNameArray[2], `${biasPrefix}_project_Conv2D`, false, {autoPad, filterLayout: 'ohwi'});
6160

6261
if (shortcut) {
6362
return this.builder_.add(input, conv1x1Linear);

0 commit comments

Comments
 (0)