Skip to content

Commit d53452b

Browse files
authored
Fix inconsistent MLTensor usage in Code example (#291)
Fixed #290
1 parent efa8974 commit d53452b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

code/samples/mul_add.js

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const tensorC = await context.createTensor({
2222
...desc,
2323
usage: MLTensorUsage.READ,
2424
readable: true,
25+
writable: false,
2526
});
2627
const inputs = {'A': tensorA, 'B': tensorB};
2728
const outputs = {'C': tensorC};

code/samples/simple_graph.js

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const outputTensor = await context.createTensor({
6262
...desc,
6363
usage: MLTensorUsage.READ,
6464
readable: true,
65+
writable: false,
6566
});
6667

6768
// Execute the compiled graph with the specified inputs.

0 commit comments

Comments
 (0)