Git Product home page Git Product logo

Comments (4)

mathmanu avatar mathmanu commented on September 3, 2024

Are you trying to modify quantization parameters via python/pycaffe interface? I have not tried it - so don't know whether it works. What is the issue that you are facing?

Currently sparsity is applied in the function:
void Net::FindAndApplyChannelThresholdNet()
in net.cpp

It may be possible to specify a layer index to this function so that it can sparsify only a selected layer.

However, the sparsity target that is specified is for the entire network. Also in
void Solver::ThresholdNet()
There is a check to see whether the sparsity target that is specified has been achieved or not. This is also based on the sparsity of the entire network. This will also need change.

from caffe-jacinto.

Wronskia avatar Wronskia commented on September 3, 2024

Hey manu,

Thanks for your answer,
Actually the error I get using pycaffe is the following TypeError: unhashable type: 'LayerParameter'

Here is my code layer.quantization_param.qparam_w.bitwidth = 8

it is acutally a type error, however what is weird is that in the caffe.proto the type of the bitwidth attribute is integer

thanks

from caffe-jacinto.

mathmanu avatar mathmanu commented on September 3, 2024

As far as I understand, pycaffe doesn't allow you to change the layer parameters. But may be you can work around this restriction by writing your own functions to get and set them. Let me know if you succeed.
https://stackoverflow.com/questions/40858548/dynamically-modify-layers-parameters-in-caffe

from caffe-jacinto.

mathmanu avatar mathmanu commented on September 3, 2024

You can also put that field into the prototxt file. But, this method doesn't allow you to change afterwards.

from caffe-jacinto.

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.