diff --git a/tfjs-layers/src/layers/convolutional.ts b/tfjs-layers/src/layers/convolutional.ts index 5207c1f88c..a4cb0d5e0c 100644 --- a/tfjs-layers/src/layers/convolutional.ts +++ b/tfjs-layers/src/layers/convolutional.ts @@ -1102,7 +1102,7 @@ export class SeparableConv extends Conv { this.depthwiseRegularizer = getRegularizer(config.depthwiseRegularizer); this.depthwiseConstraint = getConstraint(config.depthwiseConstraint); this.pointwiseInitializer = getInitializer( - config.depthwiseInitializer || this.DEFAULT_POINTWISE_INITIALIZER); + config.pointwiseInitializer || this.DEFAULT_POINTWISE_INITIALIZER); this.pointwiseRegularizer = getRegularizer(config.pointwiseRegularizer); this.pointwiseConstraint = getConstraint(config.pointwiseConstraint); } diff --git a/tfjs-layers/src/layers/convolutional_depthwise.ts b/tfjs-layers/src/layers/convolutional_depthwise.ts index ea27eebdac..ac6bb7e19e 100644 --- a/tfjs-layers/src/layers/convolutional_depthwise.ts +++ b/tfjs-layers/src/layers/convolutional_depthwise.ts @@ -204,7 +204,7 @@ export class DepthwiseConv2D extends BaseConv { config['depthwiseRegularizer'] = serializeRegularizer(this.depthwiseRegularizer); config['depthwiseConstraint'] = - serializeConstraint(this.depthwiseRegularizer); + serializeConstraint(this.depthwiseConstraint); return config; } }