Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Source data too small. Allocating larger array instrument.ts:82 #94

Open
fumiya0 opened this issue Feb 18, 2019 · 10 comments
Open

Source data too small. Allocating larger array instrument.ts:82 #94

fumiya0 opened this issue Feb 18, 2019 · 10 comments

Comments

@fumiya0
Copy link

fumiya0 commented Feb 18, 2019

I created a model for image classification using pytorch and transformed it to onnx.
Trying a random value input [1,3,224,224] to it on background 'webgl', it seems the output is almost same, regardless of the value of the input.
Console said "Souce data too small. Allocating larger array instrument.ts:82". I'm not sure how and where to fix. I think there is something wrong with the model.
My model is at https://github.com/fumiya0/patimg-classification-test/TCGA3.onnx
and you can click "predict" at https://fumiya0.github.io//patimg-classification-test/ to see what happens when the model deals with an input. Sorry for a messy code!
When I try the model res50_8.onnx, which I downloaded at onnx demo repogitory, there is no warning message and it seems to work well.
Thanks!

@SubhiH
Copy link

SubhiH commented Feb 27, 2019

I am getting the same warning message. The output of my onnx model is not the same of the original model but it is not always the same. Were you able to solve this issue?
@fumiya0

@fs-eire
Copy link
Contributor

fs-eire commented Feb 28, 2019

I tried to figure out the cause of that warning message. It looks like the webgl backend implementation in Conv operator is not working correctly when strides is not set to [1, 1]. This may need a fix for the operator. @NTT123 @hariharans29

@SubhiH
Copy link

SubhiH commented Feb 28, 2019

@fs-eire
I am using webgl as a backend. My original model is built using MXnet framework then I converted it to onnx and called it from onnxjs. In the original model, I set all the stride values for conv layers to either (1,1) or (2,2).
When I convert the back-end to 'cpu', I get an error (I think I should open an issue for that):

Error: cwise: Arrays do not all have the same shape!

Thanks!

@SubhiH
Copy link

SubhiH commented Mar 29, 2019

I would like to mention that I have built the latest version of the code and I can run the model with "wasm" back-end.
When I switch to "webgl" , I get "Source data too small. Allocating larger array".
For "wasm" back-end and after running the model tens of time, an OutOfMemory exception shows.

@Kirayue
Copy link

Kirayue commented May 8, 2019

Hello, everyone
I am getting the same warning message. According to @fs-eire, it's due to strides of Conv operator is not set to [1, 1]. But I test my two own models, both have non-[1, 1] strides, only one model causes this warning.
My question is does this affect the inference time? I want to compare the inference time to tf.js, so I want to know whether the time measured is precise with this warning.

@photopea
Copy link

I also have this problem. I have to run it on the CPU version, as WASM version does not work either.

@local-dev-31
Copy link

Same problem here, can't use the GPU and WASM doesn't support most of the operators, the inference time drop from 250fps, with onnx on python, to 8fps with the CPU backend in the browser.
Hoping for someone to fix this issue, meanwhile thanks for the great work.

@qube13
Copy link

qube13 commented Apr 10, 2020

Anybody found a solution for that problem?

@photopea
Copy link

Guys, I think Microsoft programmers stopped working on this project, because Microsoft stopped to invest money into it. So I doubt anybody will ever fix it. The sooner we switch to some alternative, the better :/

@Whiax
Copy link

Whiax commented Apr 19, 2020

Guys, I think Microsoft programmers stopped working on this project, because Microsoft stopped to invest money into it. So I doubt anybody will ever fix it. The sooner we switch to some alternative, the better :/

Probably. Sadly we don't need much but if they can't even get simple convolutions to work we should probably try tensorflowjs. I removed all strides and used maxpooling instead and it still doesn't work. I wonder how other people managed to have it working.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants