-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I can't import tinynet #2
Comments
Hi there, Sorry, that whole quantization folder needs to be redone since it's mostly just pseudocode! If you don't need the quantization step then take a look at the stuff in the sparsity folder - the iPython notebook is what I have put most of my time into. If you want to use the quantization code as a skeleton for your own implementation then you can just put any of these files in the quantization folder and rename it to tinynet.py (or import it by its actual name). I'll get round to fixing all the quantization code soon I hope. Thanks, |
Thanks, I have run your sparsity code, but after prune, the net's params didn't decreased...maybe after I change the code to .py file caused some error. |
Any chance you can put your version of this in a public repository? That way I can look through your code and try to help. Usually in pytorch to save a model you would use something along the lines of:
|
https://github.com/aaron-xichen/pytorch-playground python quantize.py --type alexnet --quant_method minmax --param_bits 8 --fwd_bits 8 --bn_bits 8 --ngpu 1 type=alexnet, quant_method=minmax, param_bits=8, bn_bits=8, fwd_bits=8, overflow_rate=0.0, acc1=0.5514, acc5=0.7819 print('save model...') "This is expected. Because it is a simulation tool. The quantized parameters are represented in float format, not integers. You need to do some post precess work yourself before deployment." |
I have run another quantizition method: his model are also unchanged... import numpy as np full precision weightsx = np.random.randn(5000, 5000).astype('float32') quantizationthreshold = 0.7 |
Could you updata the tinynet's file and the URL of tinynet.pth.tar? Thanks for your excellent work.
The text was updated successfully, but these errors were encountered: