From 956706eb131e8b08ec6e005cf8e6d1c8652703aa Mon Sep 17 00:00:00 2001 From: Belem Zhang Date: Wed, 25 Sep 2024 13:28:16 +0800 Subject: [PATCH] NNotepad - Fix #277 SyntaxError: missing ) error (#278) * Fix #277 SyntaxError: missing ) error * Remove dimensions and the value in output --- nnotepad/js/index.js | 1 - nnotepad/js/nnotepad.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/nnotepad/js/index.js b/nnotepad/js/index.js index 766c9bac..fcb4fbb9 100644 --- a/nnotepad/js/index.js +++ b/nnotepad/js/index.js @@ -130,7 +130,6 @@ function explain(outputs) { .map((output) => [ 'dataType: ' + output.dataType, - 'dimensions: ' + Util.stringify(output.shape), 'shape: ' + Util.stringify(output.shape), 'tensor: ' + dumpTensor(output.shape, output.buffer, 8), ].join('\n'), diff --git a/nnotepad/js/nnotepad.js b/nnotepad/js/nnotepad.js index 08a9fde4..5086efda 100644 --- a/nnotepad/js/nnotepad.js +++ b/nnotepad/js/nnotepad.js @@ -476,7 +476,7 @@ export class NNotepad { }(tensor, 0)); const ctor = WebNNUtil.dataTypeToBufferType(dataType); return `_.constant({dataType: "${dataType}", dimensions: ${ - Util.stringify(shape)}}, shape: ${ + Util.stringify(shape)}, shape: ${ Util.stringify(shape)}}, new ${ctor.name}([${ elements.map((n) => Util.stringifyNumber(n, dataType)).join(',')}]))`; }