Skip to content

Commit 6f9533e

Browse files
leshabirukovgramalingamtitaiwangms
authored
Doc script const 1 (microsoft#2004)
I believe, new code snippet annotation have more sense. --------- Co-authored-by: G. Ramalingam <grama@microsoft.com> Co-authored-by: Ti-Tai Wang <titaiwang@microsoft.com>
1 parent 5c31a7e commit 6f9533e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/tutorial/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ subsequently modified, this modification has no effect on the attribute-value
123123
or the ONNX function/model created. This may potentially cause the behavior
124124
of eager-mode execution to be inconsistent with the ONNX construct generated.
125125

126-
Thus, the example shown above is equivalent to the following:
126+
Thus, the second assignment to `script_const` in the following code has no effect
127+
on the subsequent call to `tensor_attr.to_function_proto()`, which will use the
128+
original value of `script_const`:
127129

128130
```{literalinclude} examples/tensor_attr2.py
129131
```
@@ -271,4 +273,3 @@ ONNX perspective, the two assignments to *g* represent two distinct tensors
271273
optimizer/index
272274
rewriter/index
273275
```
274-

0 commit comments

Comments
 (0)