diff --git a/README.md b/README.md index f3709ff..b9952d3 100644 --- a/README.md +++ b/README.md @@ -29,5 +29,11 @@ normalization for depth and rgb - not work ,so change to iter small_gicp kdtree 4. [x]use kornia build gicp -5. [ ]GICPJacobianApprox building -4. change R as four angles +5. [x]GICPJacobianApprox building + +1. [ ] select optimizer + - [ ]LGBS learn slow ? + +2. [x]change R as four angles + + diff --git a/src/gicp/model.py b/src/gicp/model.py index 2387276..f825212 100644 --- a/src/gicp/model.py +++ b/src/gicp/model.py @@ -195,8 +195,8 @@ def forward(self) -> torch.Tensor: def training(tar_pcd, src_pcd, num_epochs=1000): model = GICPModel(tar_pcd, src_pcd) - optimizer = optim.LBFGS(model.parameters(), lr=1e-3, max_iter=100, history_size=50) - scheduler = torch.optim.lr_scheduler.ReduceLROnPlateau(optimizer, mode="min") + optimizer = optim.LBFGS(model.parameters(), lr=1e-3, max_iter=20, history_size=200) + # scheduler = torch.optim.lr_scheduler.ReduceLROnPlateau(optimizer, mode="min") def closure(): optimizer.zero_grad() @@ -213,7 +213,7 @@ def closure(): start = default_timer() optimizer.step(closure) # 注意:LBFGS 需要一个闭包来重新计算模型 loss = closure() # 重新计算损失 - scheduler.step(loss) + # scheduler.step(loss) end = default_timer() - start print(