From da81815ab1f71b38bcd65dcee2b7b3c1291ec2b2 Mon Sep 17 00:00:00 2001 From: Lynne Jiang Date: Mon, 4 May 2026 13:01:21 -0700 Subject: [PATCH] Validate output channels are a multiple of groups in conv2d (#925) --- index.bs | 1 + 1 file changed, 1 insertion(+) diff --git a/index.bs b/index.bs index 981eb5a2..44e965f2 100644 --- a/index.bs +++ b/index.bs @@ -3054,6 +3054,7 @@ partial dictionary MLOpSupportLimits { 1. If |inputChannels| % |options|.{{MLConv2dOptions/groups}} is not 0, then [=exception/throw=] a {{TypeError}}. 1. Otherwise, if |inputChannels| / |options|.{{MLConv2dOptions/groups}} is not equal to |filterInputChannels|, then [=exception/throw=] a {{TypeError}}. + 1. If |outputChannels| % |options|.{{MLConv2dOptions/groups}} is not 0, then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLConv2dOptions/bias}} [=map/exists=], then: 1. If its [=MLOperand/shape=] is not [=list/equal=] to « |outputChannels| », then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-conv2d)), then [=exception/throw=] a {{TypeError}}.