You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: index.bs
+14-14
Original file line number
Diff line number
Diff line change
@@ -827,7 +827,7 @@ Its <a>default allowlist</a> is <code>'self'</code>.
827
827
828
828
<details open algorithm>
829
829
<summary>
830
-
To <dfn>create a context</dfn> given |options|, run these steps:
830
+
To <dfn>create a context</dfn> given |options| (a {{GPUDevice}} or {{MLContextOptions), run these steps:
831
831
</summary>
832
832
<div class=algorithm-steps>
833
833
1. Let |context| be a new {{MLContext}} object.
@@ -933,7 +933,7 @@ The {{MLActivation}} objects (including the ones passed as input to methods) are
933
933
934
934
<details open algorithm>
935
935
<summary>
936
-
To <dfn>create an MLActivation</dfn> given |builder|, |name|, optional |options| and optional |init-steps|, run the following steps:
936
+
To <dfn>create an MLActivation</dfn> given {{MLGraphBuilder}}|builder|, [=string=]|name|, optional [=ordered map=]|options| and optional algorithm |init-steps|, run the following steps:
To <dfn>validate buffer with descriptor</dfn> given |bufferView| and |descriptor|, run the following steps:
1185
+
To <dfn>validate buffer with descriptor</dfn> given {{MLBufferView}}|bufferView| and{{MLOperandDescriptor}} |descriptor|, run the following steps:
1186
1186
</summary>
1187
1187
<div class=algorithm-steps>
1188
1188
1. If |bufferView|'s [=element type=] does not match to |descriptor|.{{MLOperandDescriptor/dataType}} according to [this table](#appendices-mloperanddatatype-arraybufferview-compatibility), return false.
To <dfn>execute graph</dfn>, given |graph|, |inputs| and |outputs|, run the following steps:
1195
+
To <dfn>execute graph</dfn>, given {{MLGraph}}|graph|, {{MLNamedArrayBufferViews}}|inputs| and{{MLNamedArrayBufferViews}} |outputs|, run the following steps:
1196
1196
</summary>
1197
1197
<div class=algorithm-steps>
1198
1198
1. Let |inputResources| denote the input resources of |graph|.{{MLGraph/[[implementation]]}}.
To <dfn for="MLGraphBuilder" data-lt="argminmax-op">create argMin/argMax operation</dfn> given |op|, {{MLOperand}} |input| and {{MLArgMinMaxOptions}} |options|, run the following steps:
1519
+
To <dfn for="MLGraphBuilder" data-lt="argminmax-op">create argMin/argMax operation</dfn> given [=string=]|op|, {{MLOperand}} |input| and {{MLArgMinMaxOptions}} |options|, run the following steps:
To <dfn for="MLGraphBuilder" data-lt="element-wise-binary-op">create element-wise binary operation</dfn> given |op|, {{MLOperand}} |a| and {{MLOperand}} |b|, run the following steps:
2383
+
To <dfn for="MLGraphBuilder" data-lt="element-wise-binary-op">create element-wise binary operation</dfn> given [=string=]|op|, {{MLOperand}} |a| and {{MLOperand}} |b|, run the following steps:
2384
2384
</summary>
2385
2385
<div class=algorithm-steps>
2386
2386
1. [=Assert=]: |op| is one of "add", "sub", "mul", "div", "max", "min", "pow".
To <dfn for="MLGraphBuilder">broadcast-shapes</dfn> given |shape1| and |shape2|, run the following steps:
2407
+
To <dfn for="MLGraphBuilder">broadcast-shapes</dfn> given [=/list=]|shape1| and[=/list=] |shape2|, run the following steps:
2408
2408
</summary>
2409
2409
<div class=algorithm-steps>
2410
2410
1. [=Assert=]: The type of |shape1| and |shape2| is `sequence of unsigned long`.
@@ -2513,7 +2513,7 @@ Although operations *greaterOrEqual* and *lesserOrEqual* can each be implemented
2513
2513
2514
2514
<details open algorithm>
2515
2515
<summary>
2516
-
To <dfn for="MLGraphBuilder" data-lt="element-wise-logical-op">create element-wise logical operation</dfn> given |op|, {{MLOperand}} |a| and an optional {{MLOperand}} |b|, run the following steps:
2516
+
To <dfn for="MLGraphBuilder" data-lt="element-wise-logical-op">create element-wise logical operation</dfn> given [=string=]|op|, {{MLOperand}} |a| and an optional {{MLOperand}} |b|, run the following steps:
2517
2517
</summary>
2518
2518
<div class=algorithm-steps>
2519
2519
1. [=Assert=]: |op| is one of "equal", "greater", "greaterOrEqual", "lesser", "lesserOrEqual", "not".
To <dfn for="MLGraphBuilder" data-lt="element-wise-unary-op">create element-wise unary operation</dfn> given |op| and {{MLOperand}} |input|, run the following steps:
2638
+
To <dfn for="MLGraphBuilder" data-lt="element-wise-unary-op">create element-wise unary operation</dfn> given [=string=]|op| and {{MLOperand}} |input|, run the following steps:
2639
2639
</summary>
2640
2640
<div class=algorithm-steps>
2641
2641
1. [=Assert=]: |op| is one of "abs", "ceil", "cos", "erf", "exp", "floor", "identity", "log", "neg", "reciprocal", "sin", "sqrt", "tan".
To <dfn for="MLGraphBuilder" data-lt="pooling-op">create pooling operation</dfn> given |op|, {{MLOperand}} |input| and {{MLPool2dOptions}} |options|, run the following steps:
4792
+
To <dfn for="MLGraphBuilder" data-lt="pooling-op">create pooling operation</dfn> given [=string=]|op|, {{MLOperand}} |input| and {{MLPool2dOptions}} |options|, run the following steps:
4793
4793
</summary>
4794
4794
<div class=algorithm-steps>
4795
4795
1. [=Assert=]: |op| is one of "averagePool2d", "l2Pool2d", "maxPool2d".
To <dfn for="MLGraphBuilder" data-lt="reduce-op">create reduce operation</dfn> given |op|, {{MLOperand}} |input| and {{MLReduceOptions}} |options|, run the following steps:
4973
+
To <dfn for="MLGraphBuilder" data-lt="reduce-op">create reduce operation</dfn> given [=string=]|op|, {{MLOperand}} |input| and {{MLReduceOptions}} |options|, run the following steps:
4974
4974
</summary>
4975
4975
<div class=algorithm-steps>
4976
4976
1. [=Assert=]: |op| is one of "reduceL1", "reduceL2", "reduceLogSum", "reduceLogSumExp", "reduceMax", "reduceMean", "reduceMin", "reduceProduct", "reduceSum", "reduceSumSquare".
@@ -6116,7 +6116,7 @@ The {{MLOperand}} objects are created by the methods of {{MLGraphBuilder}}, inte
6116
6116
6117
6117
<details open algorithm>
6118
6118
<summary>
6119
-
To <dfn>check dimensions</dfn> given |dimensions| and |type|, run the following steps:
6119
+
To <dfn>check dimensions</dfn> given [=/list=]|dimensions| and{{MLOperandDataType}} |type|, run the following steps:
6120
6120
</summary>
6121
6121
<div class=algorithm-steps>
6122
6122
1. If the [=list/size=] of |dimensions| is 0, return false.
0 commit comments