gpu issue
Atlas-Li opened this issue · 1 comments
Hello @Lilac-Lee ,
I'm running the test.py on threedmatch dataset with all your default settings in the code, but got the following error, can you please help me with this?
`(env_lk_revisited) mingli@tarsserver4:~/env_lk_revisited/PointNetLK_Revisited$ python test.py
init_trans shape is (627, 6)
Traceback (most recent call last):
File "test.py", line 154, in
main(ARGS)
File "test.py", line 110, in main
test(args, testset, dptnetlk)
File "test.py", line 104, in test
dptnetlk.test_one_epoch(model, testloader, args.device, 'test', args.data_type, args.vis)
File "/home/mingli/env_lk_revisited/PointNetLK_Revisited/trainer.py", line 122, in
test_one_epoch
_ = model.AnalyticalPointNetLK.do_forward(ptnetlk, voxel_features_p0, voxel_coords_p0,
File "/home/mingli/env_lk_revisited/PointNetLK_Revisited/model.py", line 189, in
do_forward
r = net(q0, q1, mode, maxiter=maxiter, xtol=xtol, voxel_coords_diff=voxel_coords_diff, data_type=data_type, num_random_points=num_random_points)
File "/home/mingli/env_lk_revisited/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/mingli/env_lk_revisited/PointNetLK_Revisited/model.py", line 210, in
forward
r, g, itr = self.iclk_new(g0, p0, p1, maxiter, xtol, mode, voxel_coords_diff=voxel_coords_diff, data_type=data_type, num_random_points=num_random_points)
File "/home/mingli/env_lk_revisited/PointNetLK_Revisited/model.py", line 296, in
iclk_new
J = self.Cal_Jac(Mask_fn, A_fn, Ax_fn, BN_fn, max_idx,
File "/home/mingli/env_lk_revisited/PointNetLK_Revisited/model.py", line 260, in
Cal_Jac
J = torch.einsum('ij,jk->ik', J_, warp_condition).unsqueeze(0) # 1 X K X 6
File "/home/mingli/env_lk_revisited/lib/python3.8/site-packages/torch/functional.py", line 327, in
einsum
return _VF.einsum(equation, operands) # type: ignore[attr-defined]
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument mat2 in method wrapper__bmm)
`
Thank you in advance.
Hi, thanks for your comment. I have updated the code.