when i call to save model in training stage. It raise OSError. The trackback is as follow:

Traceback (most recent call last):
  File "/home/ym/git/action_recognition.pytorch/tools/", line 347, in <module>
    val_loss = train(epoch, best_val_loss)
  File "/home/ym/git/action_recognition.pytorch/tools/", line 323, in train, decoder_file)
  File "/home/ym/anaconda2/envs/pytorch3.0-py3.5/lib/python3.5/site-packages/torch/", line 135, in save
    return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol))
  File "/home/ym/anaconda2/envs/pytorch3.0-py3.5/lib/python3.5/site-packages/torch/", line 120, in _with_file_like
OSError: [Errno 5] Input/output error

The environment is
Python3.5 and pytorch3.0.

What’s strange is the weight files could be saved sometimes.

1 Like

It means that Python cannot write the file to disk.
This could range from the filesystem running out of space via user quotas if you are on a machine that has them to failing storage devices.

Best regards