irugina / meta-image-translation

4 stars 0 forks source link

IndexError: too many indices for array: array is 2-dimensional, but 4 were indexed #4

Open pythonxcj opened 1 year ago

pythonxcj commented 1 year ago

python train_cl.py erorr: D:\ProgramData\Anaconda3\envs\rectflow\python.exe E:/meta-image-translation/train_cl.py init -- unet encoder init -- unet encoder Traceback (most recent call last): File "E:/meta-image-translation/train_cl.py", line 304, in main(args) File "E:/meta-image-translation/train_cl.py", line 283, in main ssl_loop(args) File "E:/meta-image-translation/train_cl.py", line 247, in ssl_loop for it, inputs in enumerate(train_loader): File "D:\ProgramData\Anaconda3\envs\rectflow\lib\site-packages\torch\utils\data\dataloader.py", line 530, in next data = self._next_data() File "D:\ProgramData\Anaconda3\envs\rectflow\lib\site-packages\torch\utils\data\dataloader.py", line 570, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "D:\ProgramData\Anaconda3\envs\rectflow\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\ProgramData\Anaconda3\envs\rectflow\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in data = [self.dataset[idx] for idx in possibly_batched_index] File "E:\meta-image-translation\data\cl_sevir_dataset.py", line 63, in getitem views = torch.FloatTensor(AB[:-1, [1, 2, 4], :, :]) IndexError: too many indices for array: array is 2-dimensional, but 4 were indexed

Process finished with exit code 1 prepare_sevir_dataset.py after: shape(48,5) , dim:2 thank you!