zhutmost / lsq-net

Unofficial implementation of LSQ-Net, a neural network quantization framework
MIT License
276 stars 40 forks source link

something wrong when run main.py #7

Closed RunChengNi closed 4 years ago

RunChengNi commented 4 years ago

File "/home/chengrun/lsq-net-master/main.py", line 106, in main() File "/home/chengrun/lsq-net-master/main.py", line 19, in main log_dir = util.init_logger(args.name, output_dir, 'logging.conf') File "/home/chengrun/lsq-net-master/util/config.py", line 46, in init_logger logging.config.fileConfig(cfg_file, defaults={'logfilename': log_file}) File "/home/chengrun/.conda/envs/lsq/lib/python3.8/logging/config.py", line 71, in fileConfig formatters = _create_formatters(cp) File "/home/chengrun/.conda/envs/lsq/lib/python3.8/logging/config.py", line 104, in _create_formatters flist = cp["formatters"]["keys"] File "/home/chengrun/.conda/envs/lsq/lib/python3.8/configparser.py", line 960, in getitem raise KeyError(key) KeyError: 'formatters' can tell me where is the problem?

zhutmost commented 4 years ago

Please double check your Conda environment. Do you install all the dependencies with the correct versions?

# Create a environment with Python 3.8
conda create -n lsq python=3.8
# PyTorch GPU version >= 1.5
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
# Tensorboard visualization tool
conda install tensorboard
# Miscellaneous
conda install scikit-learn pyyaml munch
RunChengNi commented 4 years ago

yeah,i checked it,maybe  the path of log is wrong

------------------ 原始邮件 ------------------ 发件人: "zhutmost/lsq-net" <notifications@github.com>; 发送时间: 2020年7月17日(星期五) 下午4:14 收件人: "zhutmost/lsq-net"<lsq-net@noreply.github.com>; 抄送: "抓小姐姐玩"<549772655@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [zhutmost/lsq-net] something wrong when run main.py (#7)

Please double check your Conda environment. Do you install all the dependencies with the correct versions?

Create a environment with Python 3.8 conda create -n lsq python=3.8 # PyTorch GPU version >= 1.5 conda install pytorch torchvision cudatoolkit=10.1 -c pytorch # Tensorboard visualization tool conda install tensorboard # Miscellaneous conda install scikit-learn pyyaml munch

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

zhutmost commented 4 years ago

Please execute python main.py ... in the root folder of the repository.

RunChengNi commented 4 years ago

python /home/chengrun/lsq-net-master/main.py /home/chengrun/lsq-net-master/config.yaml

 is this right?

------------------ 原始邮件 ------------------ 发件人: "zhutmost/lsq-net" <notifications@github.com>; 发送时间: 2020年7月17日(星期五) 下午4:18 收件人: "zhutmost/lsq-net"<lsq-net@noreply.github.com>; 抄送: "抓小姐姐玩"<549772655@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [zhutmost/lsq-net] something wrong when run main.py (#7)

Please execute python main.py ... in the root folder of the repository.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

zhutmost commented 4 years ago
cd /home/chengrun/lsq-net-master
python main.py your_config.yaml

Do NOT change the content of the default config.yaml.

RunChengNi commented 4 years ago

python /home/chengrun/lsq-net-master/main.py /home/chengrun/lsq-net-master/myconfig.yaml

File "/home/chengrun/lsq-net-master/main.py", line 106, in <module>     main()   File "/home/chengrun/lsq-net-master/main.py", line 19, in main     log_dir = util.init_logger(args.name, output_dir, 'logging.conf')   File "/home/chengrun/lsq-net-master/util/config.py", line 46, in init_logger     logging.config.fileConfig(cfg_file, defaults={'logfilename': log_file})   File "/home/chengrun/.conda/envs/lsq/lib/python3.8/logging/config.py", line 71, in fileConfig     formatters = _create_formatters(cp)   File "/home/chengrun/.conda/envs/lsq/lib/python3.8/logging/config.py", line 104, in _create_formatters     flist = cp["formatters"]["keys"]   File "/home/chengrun/.conda/envs/lsq/lib/python3.8/configparser.py", line 960, in getitem     raise KeyError(key) KeyError: 'formatters'

still happened. ------------------ 原始邮件 ------------------ 发件人: "zhutmost/lsq-net" <notifications@github.com>; 发送时间: 2020年7月17日(星期五) 下午4:30 收件人: "zhutmost/lsq-net"<lsq-net@noreply.github.com>; 抄送: "抓小姐姐玩"<549772655@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [zhutmost/lsq-net] something wrong when run main.py (#7)

cd /home/chengrun/lsq-net-master python main.py your_config.yaml
Do NOT change the content of the default config.yaml.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

zhutmost commented 4 years ago

Please read my last reply. And please read the README.md first.

RunChengNi commented 4 years ago

ok,i know,thanks!

------------------ 原始邮件 ------------------ 发件人: "zhutmost/lsq-net" <notifications@github.com>; 发送时间: 2020年7月18日(星期六) 下午2:44 收件人: "zhutmost/lsq-net"<lsq-net@noreply.github.com>; 抄送: "抓小姐姐玩"<549772655@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [zhutmost/lsq-net] something wrong when run main.py (#7)

Closed #7.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.