Skip to content

Commit

Permalink
Doc script const 1 (#2004)
Browse files Browse the repository at this point in the history
I believe, new code snippet annotation have more sense.

---------

Co-authored-by: G. Ramalingam <[email protected]>
Co-authored-by: Ti-Tai Wang <[email protected]>
  • Loading branch information
3 people authored Feb 18, 2025
1 parent 5c31a7e commit 6f9533e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/tutorial/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ subsequently modified, this modification has no effect on the attribute-value
or the ONNX function/model created. This may potentially cause the behavior
of eager-mode execution to be inconsistent with the ONNX construct generated.

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

```{literalinclude} examples/tensor_attr2.py
```
Expand Down Expand Up @@ -271,4 +273,3 @@ ONNX perspective, the two assignments to *g* represent two distinct tensors
optimizer/index
rewriter/index
```

0 comments on commit 6f9533e

Please sign in to comment.