您好好,我在跑train.py代码的时候碰到下面的问题
(pytorch) aistudio@jupyter-115969-346818:~/work/gait$ python train.py
Initialzing...
Initializing data source...
Loading training data...
Traceback (most recent call last):
File "train.py", line 18, in
m = initialization(conf, train=opt.cache)[0]
File "/home/aistudio/work/gait/model/initialization.py", line 57, in initialization
train_source, test_source = initialize_data(config, train, test)
File "/home/aistudio/work/gait/model/initialization.py", line 18, in initialize_data
train_source.load_all_data()
File "/home/aistudio/work/gait/model/utils/data_set.py", line 45, in load_all_data
self.load_data(i)
File "/home/aistudio/work/gait/model/utils/data_set.py", line 48, in load_data
return self.getitem(index)
File "/home/aistudio/work/gait/model/utils/data_set.py", line 62, in getitem
data = [self.loader(_path) for _path in self.seq_dir[index]]
File "/home/aistudio/work/gait/model/utils/data_set.py", line 62, in
data = [self.loader(_path) for _path in self.seq_dir[index]]
File "/home/aistudio/work/gait/model/utils/data_set.py", line 52, in loader
path)[:, :, self.cut_padding:-self.cut_padding].astype(
File "/home/aistudio/work/gait/model/utils/data_set.py", line 85, in img2xarray
dims=['frame', 'img_y', 'img_x'],
File "/home/aistudio/work/anaconda3/envs/pytorch/lib/python3.6/site-packages/xarray/core/dataarray.py", line 368, in init
coords, dims = _infer_coords_and_dims(data.shape, coords, dims)
File "/home/aistudio/work/anaconda3/envs/pytorch/lib/python3.6/site-packages/xarray/core/dataarray.py", line 120, in _infer_coords_and_dims
"and dims: %s vs %s" % (len(shape), len(dims))
ValueError: different number of dimensions on data and dims: 1 vs 3
改了好几天一直都没有解决,有没有人遇到这个问题了呢,请问应该怎么解决呢
您好好,我在跑train.py代码的时候碰到下面的问题 (pytorch) aistudio@jupyter-115969-346818:~/work/gait$ python train.py Initialzing... Initializing data source... Loading training data... Traceback (most recent call last): File "train.py", line 18, in m = initialization(conf, train=opt.cache)[0] File "/home/aistudio/work/gait/model/initialization.py", line 57, in initialization train_source, test_source = initialize_data(config, train, test) File "/home/aistudio/work/gait/model/initialization.py", line 18, in initialize_data train_source.load_all_data() File "/home/aistudio/work/gait/model/utils/data_set.py", line 45, in load_all_data self.load_data(i) File "/home/aistudio/work/gait/model/utils/data_set.py", line 48, in load_data return self.getitem(index) File "/home/aistudio/work/gait/model/utils/data_set.py", line 62, in getitem data = [self.loader(_path) for _path in self.seq_dir[index]] File "/home/aistudio/work/gait/model/utils/data_set.py", line 62, in data = [self.loader(_path) for _path in self.seq_dir[index]] File "/home/aistudio/work/gait/model/utils/data_set.py", line 52, in loader path)[:, :, self.cut_padding:-self.cut_padding].astype( File "/home/aistudio/work/gait/model/utils/data_set.py", line 85, in img2xarray dims=['frame', 'img_y', 'img_x'], File "/home/aistudio/work/anaconda3/envs/pytorch/lib/python3.6/site-packages/xarray/core/dataarray.py", line 368, in init coords, dims = _infer_coords_and_dims(data.shape, coords, dims) File "/home/aistudio/work/anaconda3/envs/pytorch/lib/python3.6/site-packages/xarray/core/dataarray.py", line 120, in _infer_coords_and_dims "and dims: %s vs %s" % (len(shape), len(dims)) ValueError: different number of dimensions on data and dims: 1 vs 3 改了好几天一直都没有解决,有没有人遇到这个问题了呢,请问应该怎么解决呢