{"ScriptPreparationCode":"globalThis.backendName_testing = undefined;\r\nglobalThis.jsPerf_Module = undefined;\r\nglobalThis.testCorrectnessIterator = undefined;\r\n\r\nasync function init( backendName ) {\r\n if ( !globalThis.jsPerf_Module ) {\r\n console.log( \u0022import jsPerf_NeuralNet...\u0022 );\r\n globalThis.jsPerf_Module = await import(\r\n \u0022https://cdn.jsdelivr.net/gh/colorfulcakechen/query-submit-canvas@7a14a93d6a6fb3d37102b348f9c761548ee84d4e/CNN/jsPerf/jsPerf_NeuralNet.js\u0022 );\r\n }\r\n\r\n if ( backendName_testing != backendName ) {\r\n console.log( \u0060Change backend to \u0022${backendName}\u0022...\u0060 );\r\n globalThis.backendName_testing = backendName;\r\n\r\n globalThis.jsPerf_Module.disposeResources();\r\n\r\n await tf.ready();\r\n await tf.setBackend( backendName );\r\n\r\n globalThis.jsPerf_Module.init();\r\n \tglobalThis.testCorrectnessIterator = jsPerf_Module.testCorrectness();\r\n }\r\n\r\n if ( !globalThis.testCorrectnessIterator )\r\n return true;\r\n\r\n let testCorrectnessYield = globalThis.testCorrectnessIterator.next();\r\n if ( testCorrectnessYield.done ) {\r\n console.log( \u0060${backendName}, initialization done.\u0060 );\r\n globalThis.testCorrectnessIterator = null;\r\n return true;\r\n } else {\r\n\treturn false;\r\n }\r\n}","TestCases":[{"Name":"Async wait for init (CPU)","Code":"if ( ( globalThis.initPromiseWASM ) \u0026\u0026 ( globalThis.initPromiseWebGL ) \u0026\u0026 ( globalThis.initPromiseCPU ) ) { // For benchmark re-run.\r\n globalThis.initPromiseWASM = globalThis.initPromiseWebGL = globalThis.initPromiseCPU = null;\r\n}\r\n\r\n//const backendName = \u0022wasm\u0022;\r\nconst backendName = \u0022webgl\u0022;\r\n//const backendName = \u0022cpu\u0022;\r\nif ( !globalThis.initPromiseCPU ) {\r\n globalThis.initPromiseCPU = init( backendName );\r\n} else {\r\n globalThis.initPromiseCPU.then( ( done ) =\u003E {\r\n if ( !done ) {\r\n globalThis.initPromiseCPU = init( backendName );\r\n } else {\r\n }\r\n });\r\n}\r\n","IsDeferred":false},{"Name":"(CPU) MobileNetV1","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022MobileNetV1\u0022 );","IsDeferred":false},{"Name":"(CPU) MobileNetV1_padValid","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022MobileNetV1_padValid\u0022 );","IsDeferred":false},{"Name":"(CPU) MobileNetV2_Thin","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022MobileNetV2_Thin\u0022 );","IsDeferred":false},{"Name":"(CPU) MobileNetV2","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022MobileNetV2\u0022 );","IsDeferred":false},{"Name":"(CPU) ShuffleNetV2","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022ShuffleNetV2\u0022 );","IsDeferred":false},{"Name":"(CPU) ShuffleNetV2_byPointwise21","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022ShuffleNetV2_byPointwise21\u0022 );","IsDeferred":false},{"Name":"(CPU) ShuffleNetV2_byMobileNetV1","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022ShuffleNetV2_byMobileNetV1\u0022 );","IsDeferred":false},{"Name":"(CPU) ShuffleNetV2_byMobileNetV1_padValid","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022ShuffleNetV2_byMobileNetV1_padValid\u0022 );","IsDeferred":false},{"Name":"Async wait for init (WebGL)","Code":"//const backendName = \u0022webgl\u0022;\r\nconst backendName = \u0022cpu\u0022;\r\nif ( !globalThis.initPromiseWebGL ) {\r\n globalThis.initPromiseWebGL = init( backendName );\r\n} else {\r\n globalThis.initPromiseWebGL.then( ( done ) =\u003E {\r\n if ( !done ) {\r\n globalThis.initPromiseWebGL = init( backendName );\r\n } else {\r\n }\r\n });\r\n}\r\n","IsDeferred":false},{"Name":"(WebGL) MobileNetV1","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022MobileNetV1\u0022 );","IsDeferred":false},{"Name":"(WebGL) MobileNetV1_padValid","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022MobileNetV1_padValid\u0022 );","IsDeferred":false},{"Name":"(WebGL) MobileNetV2_Thin","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022MobileNetV2_Thin\u0022 );","IsDeferred":false},{"Name":"(WebGL) MobileNetV2","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022MobileNetV2\u0022 );","IsDeferred":false},{"Name":"(WebGL) ShuffleNetV2","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022ShuffleNetV2\u0022 );","IsDeferred":false},{"Name":"(WebGL) ShuffleNetV2_byPointwise21","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022ShuffleNetV2_byPointwise21\u0022 );","IsDeferred":false},{"Name":"(WebGL) ShuffleNetV2_byMobileNetV1","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022ShuffleNetV2_byMobileNetV1\u0022 );","IsDeferred":false},{"Name":"(WebGL) ShuffleNetV2_byMobileNetV1_padValid","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022ShuffleNetV2_byMobileNetV1_padValid\u0022 );","IsDeferred":false},{"Name":"Async wait for init (WASM)","Code":"//const backendName = \u0022wasm\u0022;\r\nconst backendName = \u0022cpu\u0022;\r\nif ( !globalThis.initPromiseWASM ) {\r\n globalThis.initPromiseWASM = init( backendName );\r\n} else {\r\n globalThis.initPromiseWASM.then( ( done ) =\u003E {\r\n if ( !done ) {\r\n globalThis.initPromiseWASM = init( backendName );\r\n } else {\r\n }\r\n });\r\n}\r\n","IsDeferred":false},{"Name":"(WASM) MobileNetV1","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022MobileNetV1\u0022 );","IsDeferred":false},{"Name":"(WASM) MobileNetV1_padValid","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022MobileNetV1_padValid\u0022 );","IsDeferred":false},{"Name":"(WASM) MobileNetV2_Thin","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022MobileNetV2_Thin\u0022 );","IsDeferred":false},{"Name":"(WASM) MobileNetV2","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022MobileNetV2\u0022 );","IsDeferred":false},{"Name":"(WASM) ShuffleNetV2","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022ShuffleNetV2\u0022 );","IsDeferred":false},{"Name":"(WASM) ShuffleNetV2_byPointwise21","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022ShuffleNetV2_byPointwise21\u0022 );","IsDeferred":false},{"Name":"(WASM) ShuffleNetV2_byMobileNetV1","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022ShuffleNetV2_byMobileNetV1\u0022 );","IsDeferred":false},{"Name":"(WASM) ShuffleNetV2_byMobileNetV1_padValid","Code":"globalThis.testSet_72x128x4.testNeuralNet_ByName( \u0022ShuffleNetV2_byMobileNetV1_padValid\u0022 );","IsDeferred":false}]}