Git Product home page Git Product logo

Comments (6)

danielemoro avatar danielemoro commented on May 7, 2024 1

@HaoranREN I've been looking into your issue and created a fix. You should hopefully have access to it soon.

The reason why you see unull_4_-1 for the first layer is because QKeras cannot find the input tensor to the first layer. This means QKeras doesn't know the the bit size used by the input tensor, and it therefore cannot determine what hardware operation would be needed to process that input. That's why the mode is null, and the bits of the inputs tensor is -1.

The reason why this is happening in the Sequential API and not the Functional API is because the Input Layer in the Sequential API is "hidden" when iterating model layers, and so the tool does not cache the input bits that would be passed in to the first convolution layer. This is just a quirk of Keras, so the fix allows code needs to handle both situations.

Thank you for bringing this to our attention,

Daniele

from qkeras.

zhuangh avatar zhuangh commented on May 7, 2024

@danielemoro please take a look. thanks

from qkeras.

lishanok avatar lishanok commented on May 7, 2024

Hi @HaoranREN,
Thank you for your input.
smult_4_8 means s:signed multi:multiplication op, 4:weight quantizer bit, 8:input quantizer bit
Regarding the undesired operation type for a Sequential model, we are fixing it right now.

from qkeras.

HaoranREN avatar HaoranREN commented on May 7, 2024

@lishanok Thanks a lot for your explanations 👍

from qkeras.

HaoranREN avatar HaoranREN commented on May 7, 2024

@danielemoro Thanks a lot for your response and it makes a lot of sense. I was also suspecting the Keras implementation, since like a said, it only happens to the first layer of the Sequential() model.

from qkeras.

zhuangh avatar zhuangh commented on May 7, 2024

a fix was merged. close it. feel free to reopen it if you have any questions.

from qkeras.

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.