Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to set parameters when training office-home with version of pytorch #32

Open
Xarlley opened this issue Feb 18, 2022 · 1 comment
Open

Comments

@Xarlley
Copy link

Xarlley commented Feb 18, 2022

C:\Users\Alarak>python D:\桌面\CDAN-master\pytorch\train_image.py --gpu_id id --net ResNet50 --dset office-home --test_interval 2000 --s_dset_path D:\桌面\OfficeHomeDataset_10072016/Art.txt --t_dset_path D:\桌面\OfficeHomeDataset_10072016/Clipart.txt CDAN
Traceback (most recent call last):
File "D:\桌面\CDAN-master\pytorch\train_image.py", line 278, in
train(config)
File "D:\桌面\CDAN-master\pytorch\train_image.py", line 84, in train
dsets["source"] = ImageList(open(data_config["source"]["list_path"]).readlines(),
FileNotFoundError: [Errno 2] No such file or directory: 'D:\桌面\OfficeHomeDataset_10072016/Art.txt'

我按照贵课题组给出的命令格式,下载好office-home数据集后,将命令格式中的../data/office-home替换成了我的实际路径D:\桌面\OfficeHomeDataset_10072016,同时加入了train_image.py的路径。但运行后出现了上面的报错。我按照报错手动在相应目录下创建了Art.txt和clipart.txt后,出现了更多错误,请问应该如何正确设置相关参数?

@Xarlley
Copy link
Author

Xarlley commented Feb 18, 2022

C:\Users\Alarak>python D:\桌面\CDAN-master\pytorch\train_image.py --gpu_id id --net ResNet50 --dset office-home --test_interval 2000 --s_dset_path D:\OfficeHomeDataset_10072016\Art.txt --t_dset_path D:\OfficeHomeDataset_10072016\Clipart.txt CDAN
Traceback (most recent call last):
File "D:\桌面\CDAN-master\pytorch\train_image.py", line 278, in
train(config)
File "D:\桌面\CDAN-master\pytorch\train_image.py", line 84, in train
dsets["source"] = ImageList(open(data_config["source"]["list_path"]).readlines(),
File "D:\桌面\CDAN-master\pytorch\data_list.py", line 35, in init
imgs = make_dataset(image_list, labels)
File "D:\桌面\CDAN-master\pytorch\data_list.py", line 17, in make_dataset
images = [(val.split()[0], np.array([int(la) for la in val.split()[1:]])) for val in image_list]
File "D:\桌面\CDAN-master\pytorch\data_list.py", line 17, in
images = [(val.split()[0], np.array([int(la) for la in val.split()[1:]])) for val in image_list]
File "D:\桌面\CDAN-master\pytorch\data_list.py", line 17, in
images = [(val.split()[0], np.array([int(la) for la in val.split()[1:]])) for val in image_list]
ValueError: invalid literal for int() with base 10: 'Clock/00001.png|'

创建好两个txt之后,顺便将路径也改成下载到的数据集给出的imagelist中默认的D盘下的相应路径,运行后出现如下报错,似乎下载到的数据集给出的list格式跟贵课题组编程时使用的list格式不完全相同,请问贵课题组是如何对office-home这一数据集进行设置的呢?
除此之外,我发现readme中给出的其他数据集已经大部分不再可用,贵课题组可否更新数据集来源?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant