【发布时间】:2020-06-22 17:58:37
【问题描述】:
我对机器学习、python 等非常不熟悉,所以请原谅我不经意的错误。我正在尝试在我拥有的街景数据集上使用机器学习系统。我找到了很多或资源,我正在使用 this package,它有很多示例并且看起来很简单。
当我尝试运行 train_distribute.py 文件时,我收到了这个错误:
(base) corey@corona:~/Desktop/pycity/GALD-Net-master$ python train_distribute.py
Traceback (most recent call last):
File "train_distribute.py", line 261, in <module>
main()
File "train_distribute.py", line 136, in main
if not os.path.exists(args.save_dir):
File "/home/corey/anaconda3/lib/python3.7/genericpath.py", line 19, in exists
os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
查看代码,它来自以下几行:
def main():
# make save dir
if args.local_rank == 0:
if not os.path.exists(args.save_dir):
os.makedirs(args.save_dir)
# launch the logger
Log.init(
log_level=args.log_level,
我猜这意味着我需要一个更精确的文件结构,并将代码指向正确的位置。我绝不是一名计算机科学家,我对这样的事情是如何工作的以及如何工作的理解几乎为零。关于我做错了什么以及如何解决问题的任何建议?
【问题讨论】:
标签: python pytorch image-segmentation training-data nonetype