Skip to content

Commit

Permalink
[doc] Update MLTensorUsage (#22127)
Browse files Browse the repository at this point in the history
- WRITE_TO => WRITE
- READ_FROM => READ
  • Loading branch information
Honry authored Sep 18, 2024
1 parent c990536 commit 30e0696
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/web/ep-webnn.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const mlContext = await navigator.ml.createContext({deviceType, ...});
const inputMLTensor = await mlContext.createTensor({
dataType: 'float32',
dimensions: [1, 3, 224, 224],
usage: MLTensorUsage.WRITE_TO,
usage: MLTensorUsage.WRITE,
});

mlContext.writeTensor(inputMLTensor, inputArrayBuffer);
Expand All @@ -123,7 +123,7 @@ const mlContext = await navigator.ml.createContext({deviceType, ...});
const myPreAllocatedMLTensor = await mlContext.createTensor({
dataType: 'float32',
dimensions: [10, 1000],
usage: MLTensorUsage.READ_FROM,
usage: MLTensorUsage.READ,
});

const myPreAllocatedOutputTensor = ort.Tensor.fromMLTensor(myPreAllocatedMLTensor, {
Expand Down

0 comments on commit 30e0696

Please sign in to comment.