-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AvgPool1d reduces the feature dimension in synthesis #337
Comments
Hi LochanaMendis, The input should be in two dimensions, i.e. 64x1800. It seems the izer tries to run AvgPool2d. Could you please check your sample input? You can use the KWS network as an example to operate on 1D data. |
Hi @ermanok, Thank you for the reply. The input dimensions are 64 x 1800 x 1 where 64 is the channel dimension and 1800 x 1 is the data dimension output from the Conv1d. I think the izer tries to run AvgPool2d. I tried giving the "in_dim" as 1800 hoping it would convert 1800 x 1 to 1D, ie 1800. It doesn't seem to work. However, I got it to work by using avgpool as [16,1] and pool_stride as [16,1] |
That's correct, in this case it runs AvgPool2d. If you can reshape your input sample data to 64x1800 instead of 64x1800x1 it will run. But if you are using some conv2d operations to obtain the input of that layer, I am not sure if you can force the input to be 1-D. If it is possible to share your network file, sample input and the script to synthesize the network, I can have a look to comment more precisely. |
It's important to note that channels correspond to memories in hardware, whereas height and width are "virtual" dimensions in the same memory as far as the hardware is concerned. Therefore, it's possible to change C-H-W into any C-X-Y where XxY = HxW, but C must remain the same. |
@rotx-maxim thanks for the explanation. So in summary, we can transform the data dimension but still keep the channel dimension intact. @ermanok thanks for the reply. I am not using conv2d in my model. All layers are 1dconv and avgpool1d. Below is an example of a model that can show this scenario. Synthesizer gives this error "Pooling or zero-padding results in a zero data dimension (input [1800, 1], result [112, 0])" if you use avg_pool as 16 instead of [16, 1]. Model
Synthesis YAML
On a separate note, the synthesizer is giving me a notice that passthrough layers l2_gap2 and l3_gap3 could potentially be combined. But I couldn't figure out a way to do so. |
This comment was marked as duplicate.
This comment was marked as duplicate.
This issue has been marked stale because it has been open for over 30 days with no activity. It will be closed automatically in 10 days unless a comment is added or the "Stale" label is removed. |
Hi,
I am getting this error when I try to implement AvgPool1d in synthesis.
"Pooling or zero-padding results in a zero data dimension (input [1800, 1], result [112, 0])."
My network configurable file:
How do I specify it to do a 1d average pool?
The text was updated successfully, but these errors were encountered: