Xilinx / BNN-PYNQ

Quantized Neural Networks (QNNs) on PYNQ
https://xilinx.github.io/finn/
BSD 3-Clause "New" or "Revised" License
662 stars 307 forks source link

To reset the "cifar10-gen-weights-W1A1.py" when the pixel size become bigger #124

Closed Changyiyu closed 4 years ago

Changyiyu commented 4 years ago

Hi, I am confused about the configuration of "ifm" and "ofm" when I change the pixel size 32x32 to 128x128. Do I need to add the convolution layer in cnv model or change the filter size? Other question about "configuration of PE and SIMD counts", I don't understand the configuration of "peCounts" and "simdCounts". What is both variable mean of it and should I configure the new parameters?

giuliogamba commented 4 years ago

Hi, if you change the size of the input image, most likely the feature maps dimensions will change as well. The dimension (assumed square) at the input of each layer is listed in the ifm and the output size in the ofm list as in line 43 and 44 in the python script used to generate the config.h file and the parameters (example script available here). You will need to change the kernel sizes as well according to the neural network topology you trained on your 128x128 pixel images.

About SIMD and PE values, can I refer you to the FINN paper, more specifically Sections 4.3 and 4.4.