nlj-guang / quantize_cnn Goto Github PK
View Code? Open in Web Editor NEWFor the most CNN, there is a method to quantize float to 8bit fixed-point.
For the most CNN, there is a method to quantize float to 8bit fixed-point.
Hello
I wanted to test quantization, i was so appreciated to find your code
But, As i couldn`t read chineese, It was a little difficult to understand meaning of parameters
Could you tell me how to run this code?
I got this error, and how i can handle this?
and actually i don`t know what is the role of the line
path = './cifar_net.pth' //i change h.path to path
act_path = os.path.join(path, 'temp', name+'_'+data_set+'_act', name+'_act.pth.tar')
init_model = torch.load(act_path)
model.load_state_dict(init_model['state_dict'])
$ python3 train.py --save-dir ./result
=> init_lr 0.001
=> lr-step 6
=> momentum 0.9
=> weight-decay 0.0001
=> batch-size 128
=> balance 100
=> save-dir ./result
Traceback (most recent call last):
File "train.py", line 151, in
main()
File "train.py", line 86, in main
init_model = torch.load(act_path)
File "/home/sr2/so0.bak/venv/venv/lib/python3.7/site-packages/torch/serialization.py", line 584, in load
with _open_file_like(f, 'rb') as opened_file:
File "/home/sr2/so0.bak/venv/venv/lib/python3.7/site-packages/torch/serialization.py", line 234, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/home/sr2/so0.bak/venv/venv/lib/python3.7/site-packages/torch/serialization.py", line 215, in init
super(_open_file, self).init(open(name, mode))
NotADirectoryError: [Errno 20] Not a directory: './cifar_net.pth/temp/vgg16_cifar10_act/vgg16_act.pth.tar'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.