intel / webml-polyfill

Deprecated, the Web Neural Network Polyfill project has been moved to https://github.com/webmachinelearning/webnn-polyfill
Apache License 2.0
161 stars 42 forks source link

[example] IterateLayers tool can't support some of the examples and can't support quant models. #987

Open mingmingtasd opened 5 years ago

mingmingtasd commented 5 years ago

Test Env: Chromium Version: build 75.0.3739.0 Platform: Linux Ubuntu 16.04

Expected Result: The tool can run successfully and print out outputs of per layer for all examples.

Actual Result: The function utils.iterateLayers are not defined in these examples : skeleton_detection, facial_landmark, object_detection and emotion_analysis. Note: But even after defining, there will be errors such as "invalid value" for object_detection and "can't read property 'subgraphs' of undefined" for facial_landmark and emotion_analysis. For skeleton_detection, the tool can't run due to the model format. Errors are shown below:

object facial skeleton emotion

How to Reproduce:

1.Start chromium sever on Linux.

2.Visit http://localhost:8080/examples.

3.Select any model and input "utils.iterateLayers([{backend: 'WebML’, prefer: 'sustained'}],[1])" into the console area of the web page. For facial_landmark, you should input "landmarkDetector.iterateLayers([{backend: 'WebML’, prefer: 'sustained'}],[1])"; for emotion_analysis, you should input "emotionAnalysis.iterateLayers([{backend: 'WebML’, prefer: 'sustained'}],[1])". (The "[1]" is optional.)

ibelem commented 5 years ago

Relevant PR: #980