Skip to content

Commit d018fb2

Browse files
committed
Use [=reject=] |promise| with a {{TypeError}}
1 parent 1aa0bbc commit d018fb2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: index.bs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1393,9 +1393,9 @@ Build a composed graph up to a given output operand into a computational graph a
13931393
<div class=algorithm-steps>
13941394
1. Let |promise| be [=a new promise=].
13951395
1. Return |promise| and run the following steps [=in parallel=]:
1396-
1. If |outputs| is empty, then [=reject=] |promise| with a "{{TypeError}}" {{DOMException}}.
1396+
1. If |outputs| is empty, then [=reject=] |promise| with a {{TypeError}}.
13971397
1. [=map/For each=] |name| &rarr; |operand| of |outputs|:
1398-
1. If |name| is empty, then [=reject=] |promise| with a "{{TypeError}}" {{DOMException}}.
1398+
1. If |name| is empty, then [=reject=] |promise| with a {{TypeError}}.
13991399
1. If any of the following sub-steps fail, then [=reject=] |promise| with an "{{OperationError}}" {{DOMException}}.
14001400
1. Let |graph| be a new {{MLGraph}}:
14011401
1. Set |graph|.{{MLGraph/[[context]]}} to [=this=].{{MLGraphBuilder/[[context]]}}.
@@ -1404,9 +1404,9 @@ Build a composed graph up to a given output operand into a computational graph a
14041404
1. Set |graph|.{{MLGraph/[[implementation]]}} to |graphImpl|.
14051405
1. Make a request to the underlying platform to initialize the graph:
14061406
1. [=map/For each=] |name| &rarr; |operand| of |outputs|:
1407-
1. If [=validating MLOperand=] given |operand| and [=this=] returns false, then [=reject=] |promise| with a "{{TypeError}}" {{DOMException}}.
1407+
1. If [=validating MLOperand=] given |operand| and [=this=] returns false, then [=reject=] |promise| with a {{TypeError}}.
14081408
1. If |operand| was created as an input by the underlying platform:
1409-
1. If |operand|.{{MLOperand/[[name]]}} is not unique for |graphImpl|, then [=reject=] |promise| with a "{{TypeError}}" {{DOMException}}.
1409+
1. If |operand|.{{MLOperand/[[name]]}} is not unique for |graphImpl|, then [=reject=] |promise| with a {{TypeError}}.
14101410
1. Add |operand|.{{MLOperand/[[descriptor]]}} to |graph|.{{MLGraph/[[inputDescriptors]]}}[|operand|.{{MLOperand/[[name]]}}].
14111411
1. If |operand| was created as a constant by the underlying platform:
14121412
1. Implementations MAY preprocess and optimize the tensor data of |operand| for the underlying platform.

0 commit comments

Comments
 (0)