Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #439: add missing conv2d() and convTranspose2d() validation steps #441

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2064,6 +2064,8 @@ partial interface MLGraphBuilder {
1. If |options| is `undefined`, let |options| be an empty [=object=].
1. If |options|.{{MLConv2dOptions/padding}} is `undefined`, set it to `[0, 0, 0, 0]`.
1. If |options|.{{MLConv2dOptions/strides}} is `undefined`, set it to `[1, 1]`.
1. Else if |options|.{{MLConv2dOptions/strides}}.size() is not `2`, then throw a "{{TypeError}}" {{DOMException}} and stop.
1. If any element in |options|.{{MLConv2dOptions/strides}} is equal to 0, then throw a "{{TypeError}}" {{DOMException}} and stop.
1. If |options|.{{MLConv2dOptions/dilations}} is `undefined`, set it to `[1, 1]`.
1. If |options|.{{MLConv2dOptions/autoPad}} is `undefined`, set it to `"explicit"`.
1. If |options|.{{MLConv2dOptions/groups}} is `undefined`, set it to `1`.
Expand Down Expand Up @@ -2230,6 +2232,8 @@ partial interface MLGraphBuilder {
1. If |options| is `undefined`, let |options| be an empty [=object=].
1. If |options|.{{MLConvTranspose2dOptions/padding}} is `undefined`, set it to `[0, 0, 0, 0]`.
1. If |options|.{{MLConvTranspose2dOptions/strides}} is `undefined`, set it to `[1, 1]`.
1. Else if |options|.{{MLConv2dOptions/strides}}.size() is not `2`, then throw a "{{TypeError}}" {{DOMException}} and stop.
1. If any element in |options|.{{MLConv2dOptions/strides}} is equal to 0, then throw a "{{TypeError}}" {{DOMException}} and stop.
1. If |options|.{{MLConvTranspose2dOptions/dilations}} is `undefined`, set it to `[1, 1]`.
1. If |options|.{{MLConvTranspose2dOptions/outputPadding}} is `undefined`, set it to `[0, 0]`.
1. If |options|.{{MLConvTranspose2dOptions/autoPad}} is `undefined`, set it to `"explicit"`.
Expand Down