Coder Social home page Coder Social logo

Comments (15)

awai54st avatar awai54st commented on July 30, 2024

Please specify: which part are you referring to? multiply with what?

from pynq-classification.

DIAMONDWHILE avatar DIAMONDWHILE commented on July 30, 2024

I use script_design_flow
Convolution in fixed_point_stream_convolution.h
Why is the output feature map of the first CONV1 output different from the CAFFE output feature map?

from pynq-classification.

awai54st avatar awai54st commented on July 30, 2024

For each layer, I scaled the weights and inputs with a scaling factor (to make them span the entire 8/16 bit signed int range) before casting them to fixed point for multiplication, such that the quantisation error is reduced (a somewhat inefficient implementation of "dynamic fixed point" quantisation). Hence, the output of each layer should also be scaled up as compared to the ARM benchmark, which uses floating point numbers.

So, ignoring the quantisation loss, the two output should also differ by a scaling factor.

from pynq-classification.

DIAMONDWHILE avatar DIAMONDWHILE commented on July 30, 2024

In HLS, my first layer of convolution is
AXI_DMA_SLAVE(in_stream, connect_0);
SCIG<3, 3, 416, 4, 416, 1> (connect_0, connect_1);
SMM<1, 27, 4>(connect_1, connect_2, 1, 0, 25);
AXI_DMA_MASTER(connect_2, out_stream);
And CAFFE's
Feat = net.blobs['conv1'].data[0, :4]
Vis_square(feat)
The output matrix gap is too large

from pynq-classification.

awai54st avatar awai54st commented on July 30, 2024

Your unrolling factor is 25 but the 2nd argument of SMM is 3x3x3=27. Vivado HLS expects the memory partitioning factor to be an integer factor of the memory size.

For debugging please write a HLS testbench about the first layer, and check the code’s correctness. The report provided in the repo should be enough to explain how the code works.

from pynq-classification.

DIAMONDWHILE avatar DIAMONDWHILE commented on July 30, 2024

If I do not use "factors", how should I write
I want to confirm whether the reason for the failure is related to factors

from pynq-classification.

awai54st avatar awai54st commented on July 30, 2024

The failure is probably not about the factors, but it's worth noting. You can try a factor like 3, 9, or 27 instead of 25. Regarding the source of failure, I really cannot tell based on the provided information. Please try to debug by using a testbench.

from pynq-classification.

DIAMONDWHILE avatar DIAMONDWHILE commented on July 30, 2024

Could you teach me how to write a test bench?

from pynq-classification.

awai54st avatar awai54st commented on July 30, 2024

Guide here

from pynq-classification.

DIAMONDWHILE avatar DIAMONDWHILE commented on July 30, 2024

I found that I changed the size of the image to 32 x 32 is the normal feature map
If the picture size is 416 x 416 it is not normal, which is why

from pynq-classification.

DIAMONDWHILE avatar DIAMONDWHILE commented on July 30, 2024

I found that it seems that parallelism caused
Because of the repeated transmission of data

from pynq-classification.

DIAMONDWHILE avatar DIAMONDWHILE commented on July 30, 2024

The problem is solved
Thanks for your help

from pynq-classification.

wangenyi avatar wangenyi commented on July 30, 2024

hi
in script_design_flow,i can find axi_dma_slave/master and they connect the first SCIG layer and the last FC layer ,but in graphic_design_flow,i cant find them.why ?thank you!

from pynq-classification.

awai54st avatar awai54st commented on July 30, 2024

Good to know! @DIAMONDWHILE

from pynq-classification.

awai54st avatar awai54st commented on July 30, 2024

Answered here.

Please do not duplicate your question on multiple issues. @wangenyi

from pynq-classification.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.