mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-14 18:12:05 +00:00
[doc] Update MLTensorUsage (#22127)
- WRITE_TO => WRITE - READ_FROM => READ
This commit is contained in:
parent
c990536309
commit
30e0696cea
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
@ -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, {
|
||||
|
|
|
|||
Loading…
Reference in a new issue