From 293ecef0cca27be3fa6d9eac55969ca6087e11f1 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Mon, 6 May 2024 11:37:27 -0700 Subject: [PATCH] Add missing definitions of inputShape to conv2d algorithms The algorithms for both conv2d() and convTranspose2d() used an `inputShape` local variable, but never defined it. Oops! The meaning was obvious, but we do need to define and initialize it to keep tooling happy. --- index.bs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.bs b/index.bs index 087952ad..f56ab521 100644 --- a/index.bs +++ b/index.bs @@ -1872,6 +1872,7 @@ partial interface MLGraphBuilder { 1. Otherwise, if |options|.{{MLConv2dOptions/dilations}}'s [=list/size=] is not 2, then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLConv2dOptions/groups}} is 0, then [=exception/throw=] a {{TypeError}}. 1. *Calculate the output shape:* + 1. Let |inputShape| be |input|'s [=MLOperand/shape=]. 1. Switch on |options|.{{MLConv2dOptions/inputLayout}}:
: {{MLInputOperandLayout/"nchw"}} @@ -2085,6 +2086,7 @@ partial interface MLGraphBuilder { 1. Otherwise: 1. If |options|.{{MLConvTranspose2dOptions/outputPadding}}[0] is greater than or equal to |options|.{{MLConvTranspose2dOptions/strides}}[0], or |options|.{{MLConvTranspose2dOptions/outputPadding}}[1] is greater than or equal to |options|.{{MLConvTranspose2dOptions/strides}}[1], then [=exception/throw=] a {{TypeError}}. 1. *Calculate the output shape:* + 1. Let |inputShape| be |input|'s [=MLOperand/shape=]. 1. Switch on |options|.{{MLConvTranspose2dOptions/inputLayout}}:
: {{MLInputOperandLayout/"nchw"}}