Coder Social home page Coder Social logo

Comments (9)

emilianogagliardi avatar emilianogagliardi commented on June 30, 2024 1

I will try

from cnn-compression-performance.

emilianogagliardi avatar emilianogagliardi commented on June 30, 2024

How do you call the script? Have you defined a class that implements ToBeQuantizedNetwork defined in pattern/pattern.py?

from cnn-compression-performance.

Shringa13 avatar Shringa13 commented on June 30, 2024

Sorry. How do we do that?
Can you give me an example of it?

from cnn-compression-performance.

emilianogagliardi avatar emilianogagliardi commented on June 30, 2024

You can find an example of the script invocation command in aut.sh, or better, you can see the meaning of the parameters with
python workflow.py --help
To define an implementation of ToBeQuantizedNetwork you can take as example CNN-compression-performance/tf_quantize/CNNs/mnist_models/2conv_2fc.py. I suggest you to watch the definition of ToBeQuantizedNetwork in CNN-compression-performance/tf_quantize/pattern/pattern.py.
I'm sorry, I know this is not user friendly, but we used this implementation mechanism to be fast in evaluating different networks. The first objective was to obtain performance parameters to compare different nets.

from cnn-compression-performance.

Shringa13 avatar Shringa13 commented on June 30, 2024

Thank you . I will read it again and will try to run it and if I still face any issue will let you know

from cnn-compression-performance.

Shringa13 avatar Shringa13 commented on June 30, 2024

1 more question: Where I can find these checkpoints
checkpoint_prefix = 'CNNs/mnist_models/net_serializations/2conv_2fc/net'
checkpoint_path = 'CNNs/mnist_models/net_serializations/2conv_2fc'

from cnn-compression-performance.

emilianogagliardi avatar emilianogagliardi commented on June 30, 2024

No problem, I hope we will be able to provide a better documentation one of this days.
Actually you should create the net_serialization dir, then the script will save into it the network with its weights after the training (if you used --train=True) and the quantized network (still, if you used --quantize=True). To quantise the net you have to install the TensorFlow tool, and export the env variable TF_HOME containing the path to you TensorFlow home.

from cnn-compression-performance.

Shringa13 avatar Shringa13 commented on June 30, 2024

You guys have already provided so much information and thank you for sharing this details. I have just started learning this and faced issue while implementing quantization part. I can able to run your code now 👍
If you can able to look into my code and let me know where I am going wrong, here is the link of all the details:
https://stackoverflow.com/questions/47492130/you-must-feed-a-value-for-placeholder-tensor-placeholder-with-dtype-float-and?noredirect=1#comment82006554_47492130

from cnn-compression-performance.

Shringa13 avatar Shringa13 commented on June 30, 2024

Hey,
I am still getting error for this 2 variables:
checkpoint_prefix = 'CNNs/mnist_models/net_serializations/2conv_2fc/net'
checkpoint_path = 'CNNs/mnist_models/net_serializations/2conv_2fc'

I have created 3 directories as shown in path above net_serializations -> 2conv_2fc -> net and getting error ::
ValueError: Parent directory of CNNs/net_serializations/2conv_2fc/net doesn't exist, can't save.
Is there anything else I am missing?
I am running your code by providing below command:
python workflow.py --quantize True --evaluate True --train True --module_name
CNNs.mnist_models.2conv_2fc --class_name Mnist2Conv2Fc

and have the same folder structure as you have mentioned.

from cnn-compression-performance.

Related Issues (3)

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.