OSError: [Errno 22] Invalid argument:

今日踩的坑

今天保存模型的时候报的这个错误

torch.save(model.state_dic(), 'epoch:{epoch},loss:{loss}.pkl')

文件名违规

于是查了一下windows下的命名规则:

  不能包含:< > / \ | :  * ? 
  不超过255个字符

posted @ 2021-09-28 15:58  小艾衰  阅读(593)  评论(0编辑  收藏  举报