Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

[Layers] Update DepthwiseConv2D(filterShape:...) bias initialization #441

Merged
merged 5 commits into from
Sep 24, 2019

Conversation

jon-tow
Copy link
Contributor

@jon-tow jon-tow commented Aug 10, 2019

Issue: DepthwiseConv2D(filterShape:strides:padding:activation:filterInitializer:...)
produces a shape mismatch error in the conv-bias sum of callAsFunction() when initialized under a
filterShape with channel-multiplier greater than 1.
More specifically, this is caused by initializing the bias vector with dimension equal to said channel-multiplier.

Fix :This PR adds the proper bias vector initialization by computing the dimensionality as:
bias vector dimension = output channel count = (input channel count * channel multiplier)

@rxwei rxwei requested review from eaplatanios and rxwei August 10, 2019 23:40
@rxwei
Copy link
Contributor

rxwei commented Aug 10, 2019

Thanks for the patch. Could you please add a test?

@rxwei rxwei merged commit 2bdb02f into tensorflow:master Sep 24, 2019
ocampor pushed a commit to ocampor/swift-apis that referenced this pull request Oct 4, 2019
…ion (tensorflow#441)

**Issue**: `DepthwiseConv2D(filterShape:strides:padding:activation:filterInitializer:...)`
 produces a shape mismatch error in the conv-bias sum of `callAsFunction()` when initialized under a 
`filterShape` with channel-multiplier greater than `1`.
 More specifically, this is caused by initializing the `bias` vector with dimension equal to said channel-multiplier. 

**Fix** :This PR adds the proper `bias` vector initialization by computing the dimensionality as:
`bias vector dimension = output channel count = (input channel count * channel multiplier)`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants