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 46 forks source link

[WebGL] The outputs don't match the expected values for AVERAGE_POOL_2D operation with WebGL backend #380

Closed Christywl closed 5 years ago

Christywl commented 5 years ago

Test Env: Chromium nightly build 70.0.3503.0 (6540a81) Platform: Mac/Linux/Windows/Android

Expected Result: Tests should pass.

Actual Result: The outputs don't match the expected values for AVERAGE_POOL_2D operation with WebGL backend: check result for Avg pool float example/2: image

check result for Avg pool float example/4: image

How to Reproduce:

  1. Launch chromium and disable WebML flag
  2. Visit https://brucedai.github.io/nt/test/avg_pool_2d.html?backend=webgl
    • check result for Avg pool float example/2
    • check result for Avg pool float example/4

They passed before with webgl2 backend.

Wenzhao-Xiang commented 5 years ago

Different results for ResNet50 v1(Onnx) and Inception v2(Onnx) between WASM and WebGL backend.

Inception v2(Onnx): WASM: inception_v2_wasm WebGL: inception_v2_webgl

ResNet50 v1(Onnx): WASM: resnet50_v1_wasm WebGL: resnet50_v1_webgl

These two models contains AveragePool with fuse padding, which leads to the difference.

Christywl commented 5 years ago

This issue was fixed with https://github.com/intel/webml-polyfill/commit/63c1ca253e7fa7d19267b8e8eb71a3b618d3fa65 on nightly build 8755e6b.