@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'
@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'