@@ -4,6 +4,7 @@ import {ResNet50V1FP16Nchw} from './resnet50v1_fp16_nchw.js';
44import { EfficientNetFP16Nchw } from './efficientnet_fp16_nchw.js' ;
55import { MobileNetV2Nchw } from './mobilenet_nchw.js' ;
66import { MobileNetV2Nhwc } from './mobilenet_nhwc.js' ;
7+ import { MobileNetV2Uint8Nhwc } from './mobilenet_uint8_nhwc.js' ;
78import { SqueezeNetNchw } from './squeezenet_nchw.js' ;
89import { SqueezeNetNhwc } from './squeezenet_nhwc.js' ;
910import { ResNet50V2Nchw } from './resnet50v2_nchw.js' ;
@@ -52,6 +53,9 @@ const modelList = {
5253 'squeezenet' ,
5354 'resnet50v2' ,
5455 ] ,
56+ 'uint8' : [
57+ 'mobilenet' ,
58+ ] ,
5559 } ,
5660 'gpu' : {
5761 'float32' : [
@@ -102,16 +106,19 @@ $('#backendBtns .btn').on('change', async (e) => {
102106 if ( backendId == 'webnn_gpu' ) {
103107 ui . handleBtnUI ( '#float16Label' , false ) ;
104108 ui . handleBtnUI ( '#float32Label' , false ) ;
109+ ui . handleBtnUI ( '#uint8Label' , true ) ;
105110 $ ( '#float32' ) . click ( ) ;
106111 utils . displayAvailableModels ( modelList , modelIds , deviceType , dataType ) ;
107112 } else if ( backendId == 'webnn_npu' ) {
108113 ui . handleBtnUI ( '#float16Label' , false ) ;
109114 ui . handleBtnUI ( '#float32Label' , true ) ;
115+ ui . handleBtnUI ( '#uint8Label' , true ) ;
110116 $ ( '#float16' ) . click ( ) ;
111117 utils . displayAvailableModels ( modelList , modelIds , deviceType , 'float16' ) ;
112118 } else {
113119 ui . handleBtnUI ( '#float16Label' , true ) ;
114120 ui . handleBtnUI ( '#float32Label' , false ) ;
121+ ui . handleBtnUI ( '#uint8Label' , false ) ;
115122 $ ( '#float32' ) . click ( ) ;
116123 utils . displayAvailableModels ( modelList , modelIds , deviceType , 'float32' ) ;
117124 }
@@ -130,6 +137,8 @@ $('#modelBtns .btn').on('change', async (e) => {
130137 modelName = modelId ;
131138 if ( dataType == 'float16' ) {
132139 modelName += 'fp16' ;
140+ } else if ( dataType == 'uint8' ) {
141+ modelName += 'uint8' ;
133142 }
134143
135144 await main ( ) ;
@@ -298,6 +307,7 @@ function constructNetObject(type) {
298307 'efficientnetfp16nchw' : new EfficientNetFP16Nchw ( ) ,
299308 'mobilenetnchw' : new MobileNetV2Nchw ( ) ,
300309 'mobilenetnhwc' : new MobileNetV2Nhwc ( ) ,
310+ 'mobilenetuint8nhwc' : new MobileNetV2Uint8Nhwc ( ) ,
301311 'squeezenetnchw' : new SqueezeNetNchw ( ) ,
302312 'squeezenetnhwc' : new SqueezeNetNhwc ( ) ,
303313 'resnet50v2nchw' : new ResNet50V2Nchw ( ) ,
0 commit comments