ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 6 and the array at index 1 has size 4
Alicebash opened this issue · 2 comments
Can you help me think of a solution? The following is the run log.
You can see that the first few lines are still working.
Error starts when loading this file:" load training files ../../data/3DMatch/patches/train/train_poses_20_2048_35297.pkl"
"
2021-04-09T22:11:28.071900798Z Epoch: 0 [8943/9288] loss: 1.08 time: 43121.72s
2021-04-09T22:11:28.071930576Z Accuracy: 75.0000
2021-04-09T22:11:28.071934952Z
2021-04-09T22:11:32.552623009Z Epoch: 0 [8944/9288] loss: 1.10 time: 43126.20s
2021-04-09T22:11:32.552852758Z Accuracy: 72.3684
2021-04-09T22:11:32.552863076Z
2021-04-09T22:11:37.068269898Z Epoch: 0 [8945/9288] loss: 1.01 time: 43130.72s
2021-04-09T22:11:37.068294325Z Accuracy: 80.2632
2021-04-09T22:11:37.068298722Z
2021-04-09T22:11:37.279102569Z load training files ../../data/3DMatch/patches/train/train_poses_20_2048_35297.pkl
2021-04-09T22:11:37.281540945Z Traceback (most recent call last):
2021-04-09T22:11:37.281556553Z File "train.py", line 99, in
2021-04-09T22:11:37.284176280Z trainer.train()
2021-04-09T22:11:37.284185636Z File "/Work/SpinNet/ThreeDMatch/Train/trainer.py", line 52, in train
2021-04-09T22:11:37.284730993Z self.train_epoch(epoch)
2021-04-09T22:11:37.284737622Z File "/Work/SpinNet/ThreeDMatch/Train/trainer.py", line 83, in train_epoch
2021-04-09T22:11:37.285075094Z for iter, (anc_local_patch, pos_local_patch, rotate, shift) in enumerate(self.train_loader):
2021-04-09T22:11:37.285083469Z File "/opt/conda/envs/spinnet/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 363, in next
2021-04-09T22:11:37.285255810Z data = self._next_data()
2021-04-09T22:11:37.285261255Z File "/opt/conda/envs/spinnet/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 403, in _next_data
2021-04-09T22:11:37.285435966Z data = self._dataset_fetcher.fetch(index) # may raise StopIteration
2021-04-09T22:11:37.285444043Z File "/opt/conda/envs/spinnet/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
2021-04-09T22:11:37.285530279Z data = [self.dataset[idx] for idx in possibly_batched_index]
2021-04-09T22:11:37.285535661Z File "/opt/conda/envs/spinnet/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
2021-04-09T22:11:37.285625083Z data = [self.dataset[idx] for idx in possibly_batched_index]
2021-04-09T22:11:37.285632727Z File "/Work/SpinNet/ThreeDMatch/Train/dataset.py", line 88, in getitem
2021-04-09T22:11:37.285933865Z self.patches[i] = np.concatenate(([pose, self.patches[i]]))
2021-04-09T22:11:37.285939200Z File "<array_function internals>", line 6, in concatenate
2021-04-09T22:11:37.286388940Z ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 6 and the array at index 1 has size 4
"
Hi @Alicebash,
I have already fixed the bug and updated the code. Sorry for the inconvenience.
What was the fix?