Skip to content

Validate output channels are a multiple of groups in conv2d#932

Open
lynne0326 wants to merge 1 commit intowebmachinelearning:mainfrom
lynne0326:fix-conv2d-validation-925
Open

Validate output channels are a multiple of groups in conv2d#932
lynne0326 wants to merge 1 commit intowebmachinelearning:mainfrom
lynne0326:fix-conv2d-validation-925

Conversation

@lynne0326
Copy link
Copy Markdown

@lynne0326 lynne0326 commented May 4, 2026

This PR addresses #925.


Preview | Diff

Comment thread index.bs
:: Let « |outputChannels|, |filterInputChannels|, |filterHeight|, |filterWidth| » be |filterShape|.
</dl>
1. If |inputChannels| % |options|.{{MLConv2dOptions/groups}} is not 0, then [=exception/throw=] a {{TypeError}}.
1. If |outputChannels| % |options|.{{MLConv2dOptions/groups}} is not 0, then [=exception/throw=] a {{TypeError}}.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider moving the new check to after the "Otherwise, if |inputChannels| / |options|.{{MLConv2dOptions/groups}} is not equal to |filterInputChannels|" step? This keeps the related inputChannels checks grouped together and avoids breaking the if/otherwise prose flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants