Skip to content
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

@bobo0810 你好,我用的第六章,训练过程中报错,一直没解决,能帮忙看下嘛,谢谢。 #151

Closed
TravisTorch opened this issue May 13, 2019 · 3 comments

Comments

@TravisTorch
Copy link

TravisTorch commented May 13, 2019

@bobo0810 你好,我用的第六章,训练过程中报错,一直没解决,能帮忙看下嘛,谢谢。
travis@T:~$ python /home/travis/下载/pytorch-book-master/chapter6-实战指南/main.py train --train-data-root=/home/travis/下载/dogcat/train --use-gpu=False --env=classifier
user config:
env classifier
vis_port 8097
model SqueezeNet
train_data_root /home/travis/下载/dogcat/train
test_data_root /home/travis/下载/dogcat/test1
load_model_path None
batch_size 32
use_gpu False
num_workers 4
print_freq 20
debug_file /tmp/debug
result_file result.csv
max_epoch 10
lr 0.001
lr_decay 0.5
weight_decay 0.0
WARNING:root:Setting up a new session...
WARNING:visdom:Without the incoming socket you cannot receive events from the server or register event handlers to your Visdom client.
547it [08:13, 1.17it/s]
Traceback (most recent call last):
File "/home/travis/下载/pytorch-book-master/chapter6-实战指南/main.py", line 165, in
fire.Fire()
File "/home/travis/anaconda3/lib/python3.6/site-packages/fire/core.py", line 127, in Fire
component_trace = _Fire(component, args, context, name)
File "/home/travis/anaconda3/lib/python3.6/site-packages/fire/core.py", line 366, in _Fire
component, remaining_args)
File "/home/travis/anaconda3/lib/python3.6/site-packages/fire/core.py", line 542, in _CallCallable
result = fn(*varargs, **kwargs)
File "/home/travis/下载/pytorch-book-master/chapter6-实战指南/main.py", line 109, in train
model.save()
File "/home/travis/下载/pytorch-book-master/chapter6-实战指南/models/basic_module.py", line 28, in save
t.save(self.state_dict(), name)
File "/home/travis/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 224, in save
return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol))
File "/home/travis/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 147, in _with_file_like
f = open(f, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/squeezenet_0513_14:35:30.pth'

@TravisTorch TravisTorch changed the title @bobo0810 你好,我用的第六章,0.3分支的代码,训练过程中报错,一直没解决,能帮忙看下嘛,谢谢。 @bobo0810 你好,我用的第六章,训练过程中报错,一直没解决,能帮忙看下嘛,谢谢。 May 13, 2019
@sdzbft
Copy link

sdzbft commented May 30, 2019

命令行参数 不要写预训练模型的路径,默认为None

@bobo0810
Copy link

@ft-sunshine 嗯

@bobo0810
Copy link

@TravisTorch 建议使用pycharm debug按行调试,并结合 命令行的出错信息。快速定位并解决bug~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants