From 405c85cccdda03aade55b26b0dfec4a3ebf063c0 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Wed, 10 Jan 2024 13:59:30 -0800 Subject: [PATCH] Wording change: New up a specific type, rather than just object In algorithms that mint MLActivations and MLOperands, construct the actual type not a generic "object". Also, use Infra wording around optional paramters to those algorithms. For #450 --- index.bs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.bs b/index.bs index 178a924e..c610456b 100644 --- a/index.bs +++ b/index.bs @@ -897,18 +897,18 @@ The {{MLActivation}} objects (including the ones passed as input to methods) are
- To create an MLActivation given |builder|, |name|, |options| and |init-steps|, run the following steps: + To create an MLActivation given |builder|, |name|, optional |options| and optional |init-steps|, run the following steps:
- 1. Let |activation| be a new [=object=]. + 1. Let |activation| be a new {{MLActivation}}. 1. Set |activation|.{{MLActivation/[[builder]]}} to |builder|. 1. Set |activation|.{{MLActivation/[[name]]}} to |name|. - 1. If |options| is an [=object=], set |activation|.{{MLActivation/[[options]]}} to |options|. + 1. If |options| is given, set |activation|.{{MLActivation/[[options]]}} to |options|. 1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}. 1. Make a request to the underlying platform to: 1. Create an [=implementation-defined=] platform operator |opImpl| for the given |name| operation. 1. Set |activation|.{{MLActivation/[[operator]]}} to |opImpl|. - 1. If |init-steps| are defined, run |init-steps| with |options|. + 1. If |init-steps| are given, run |init-steps| with |options|. 1. Otherwise, initialize |activation|.{{MLActivation/[[operator]]}} given |options| in an [=implementation-defined=] way for the given |name| operation. 1. Return |activation|.
@@ -6185,7 +6185,7 @@ The {{MLOperand}} objects are created by the methods of {{MLGraphBuilder}}, inte
1. [=Assert=]: the type of |builder| is {{MLGraphBuilder}}. 1. [=Assert=]: the type of |desc| is {{MLOperandDescriptor}}. - 1. Let |operand| be a new [=object=]. + 1. Let |operand| be a new {{MLOperand}}. 1. Set |operand|.{{MLOperand/[[builder]]}} to |builder|. 1. Set |operand|.{{MLOperand/[[descriptor]]}} to |desc|. 1. Return |operand|. @@ -6198,7 +6198,7 @@ The {{MLOperand}} objects are created by the methods of {{MLGraphBuilder}}, inte
1. [=Assert=]: the type of |operand| is {{MLOperand}}. - 1. Let |result| be a new [=object=]. + 1. Let |result| be a new {{MLOperand}}. 1. Set |result|.{{MLOperand/[[builder]]}} to |operand|.{{MLOperand/[[builder]]}}. 1. Set |result|.{{MLOperand/[[descriptor]]}} to |operand|.{{MLOperand/[[descriptor]]}}. 1. If |operand|.{{MLOperand/[[name]]}} [=map/exists=], then set |result|.{{MLOperand/[[name]]}} to |operand|.{{MLOperand/[[name]]}}.