From 30e0696cea951ee164baee2922a07b2380ef2fcc Mon Sep 17 00:00:00 2001 From: Wanming Lin Date: Thu, 19 Sep 2024 00:35:23 +0800 Subject: [PATCH] [doc] Update MLTensorUsage (#22127) - WRITE_TO => WRITE - READ_FROM => READ --- docs/tutorials/web/ep-webnn.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/web/ep-webnn.md b/docs/tutorials/web/ep-webnn.md index e97d035b8f..f04dd7870d 100644 --- a/docs/tutorials/web/ep-webnn.md +++ b/docs/tutorials/web/ep-webnn.md @@ -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, {