burn icon indicating copy to clipboard operation
burn copied to clipboard

Candle backend crashes web app in image-classification-web

Open antimora opened this issue 2 years ago • 4 comments

Describe the bug Candle backend crashes web app in image-classification-web.

To Reproduce

  1. cd examples/image-classification-web
  2. run ./build-for-web.sh
  3. run ./run-server.sh
  4. open the browser with the served link
  5. change backed to Candle
  6. select image.
  7. open debug console and you'll notice error

Expected behavior The image is classified without a crash.

Screenshots image

antimora avatar Dec 01 '23 18:12 antimora

The issue is Candle does not support excluding pad count in pooling

dcvz avatar Dec 04 '23 20:12 dcvz

The average pool config that is being used in the squeezenet is using .with_count_include_pad(false) which is not supported in Candle.

dcvz avatar Dec 04 '23 21:12 dcvz

The average pool config that is being used in the squeezenet is using .with_count_include_pad(false) which is not supported in Candle.

We can fix this by:

  1. Modify Candle backend with Zero padding the input before average pool (this is what PyTorch did).
  2. File a ticket with Candle team to enhance the avr pool.

antimora avatar Dec 07 '23 18:12 antimora

The average pool config that is being used in the squeezenet is using .with_count_include_pad(false) which is not supported in Candle.

We can fix this by:

  1. Modify Candle backend with Zero padding the input before average pool (this is what PyTorch did).
  2. File a ticket with Candle team to enhance the avr pool.

@louisfd do you think it's possible?

nathanielsimard avatar Dec 12 '23 18:12 nathanielsimard