解决:main.py: error: the following arguments are required:XX

从网上下载的pytorch代码运行时,经常会出现main.py: error: the following arguments are required: XX
这是由于没有添加相应的配置

1.在pycharm中点击Run–>Edit

解决:main.py: error: the following arguments are required:XX_第1张图片 

2.点击Edit Configuration右侧的小箭头,进入Enter script parameters

解决:main.py: error: the following arguments are required:XX_第2张图片 

3.在Enter script parameters中进行相关配置 

解决:main.py: error: the following arguments are required:XX_第3张图片 

 

 

 

 

 

你可能感兴趣的:(自我学习,python)