Pytorch下实现Unet问题

问题遇到的现象和发生背景

Pytorch下实现Unet对自己多类别数据集的语义分割时找不到train.txt

问题相关代码,请勿粘贴截图

FileNotFoundError: [Errno 2] No such file or directory: '/U-Net/voc2012/ImageSets\Segmentation\train.txt'

运行结果及报错内容
我的解答思路和尝试过的方法

途径我已经检查过了,不会有问题

我想要达到的结果

img

/U-Net/voc2012/ImageSets\Segmentation\train.txt

这种写法是linux 下的目录。
我想你的意思 应该是把数据放在当前目录下的voc2012/ImageSets\Segmentation\train.txt?
确认下你的数据目录,然后改下你的程序 train.py

/U-Net/voc2012/ImageSets\Segmentation\train.txt
改为
voc2012/ImageSets/Segmentation/train.txt