YuxiangZhang-BIT / IEEE_TIP_SDEnet

Single-source Domain Expansion Network for Cross-Scene Hyperspectral Image Classification, IEEE TIP, 2023.
MIT License
34 stars 8 forks source link

AttributeError: 'File' object has no attribute 'transpose' #3

Open xcxcever opened 11 months ago

xcxcever commented 11 months ago

我跑SDE和LDG都遇到数据读取不进来的问题 Traceback (most recent call last): File "D:\code\IEEE_TIP_SDEnet-main\IEEE_TIP_SDEnet-main\train.py", line 256, in experiment() File "D:\code\IEEE_TIP_SDEnet-main\IEEE_TIP_SDEnet-main\train.py", line 114, in experiment img_src, gt_src, LABEL_VALUES_src, IGNORED_LABELS, RGB_BANDS, palette = get_dataset(args.source_name, File "D:\code\IEEE_TIP_SDEnet-main\IEEE_TIP_SDEnet-main\datasets.py", line 103, in get_dataset img = open_file(folder + 'Houston13.mat')['ori_data'] File "D:\code\IEEE_TIP_SDEnet-main\IEEE_TIP_SDEnet-main\utils_HSI.py", line 45, in open_file return h5py.File(dataset).transpose(1, 2, 0) AttributeError: 'File' object has no attribute 'transpose'

YuxiangZhang-BIT commented 11 months ago

我跑SDE和LDG都遇到数据读取不进来的问题 Traceback (most recent call last): File "D:\code\IEEE_TIP_SDEnet-main\IEEE_TIP_SDEnet-main\train.py", line 256, in experiment() File "D:\code\IEEE_TIP_SDEnet-main\IEEE_TIP_SDEnet-main\train.py", line 114, in experiment img_src, gt_src, LABEL_VALUES_src, IGNORED_LABELS, RGB_BANDS, palette = get_dataset(args.source_name, File "D:\code\IEEE_TIP_SDEnet-main\IEEE_TIP_SDEnet-main\datasets.py", line 103, in get_dataset img = open_file(folder + 'Houston13.mat')['ori_data'] File "D:\code\IEEE_TIP_SDEnet-main\IEEE_TIP_SDEnet-main\utils_HSI.py", line 45, in open_file return h5py.File(dataset).transpose(1, 2, 0) AttributeError: 'File' object has no attribute 'transpose'

我在datasets.py的get_dataset()和在utils_HSI.py的open_file()中做了修改。如有问题再联系我~

xcxcever commented 10 months ago

作者您好: 我这两天调试的时候遇到TypeError: empty() received an invalid combination of arguments - got (tuple, dtype=NoneType, device=NoneType), but expected one of: