Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loss not reducing #20

Closed
ashutosh1807 opened this issue May 12, 2022 · 4 comments
Closed

Loss not reducing #20

ashutosh1807 opened this issue May 12, 2022 · 4 comments

Comments

@ashutosh1807
Copy link

Hi I am trying to train depth former but the loss is not reducing. PFA log file
swin_nyu.log
.

@zhyever
Copy link
Owner

zhyever commented May 13, 2022

I think that's a convergence issue of the direct regression model with the si-log loss. A better solution may use other losses like RMSE loss to warm up the model and then apply the silog, but I do not have enough time right now to conduct these modifications.

For now, you can just re-run the training script, since this convergence issue randomly occurs. When you see the loss in your log is around 3.0 but does not continually drop, it means the model has collapsed. Just stop it and re-run the script. Once the loss drops, there will be no other problems in the training stage.

@ashutosh1807
Copy link
Author

Are you sure that is the issue? BTS also has direct regression model with the si-log loss, but the loss works for that.

@zhyever
Copy link
Owner

zhyever commented May 13, 2022

Yes, definitely. It is the issue of how to "directly" regress the predictions. Please refer to these codes.

In BTS, they apply the sigmoid as (see config):

output = self.sigmoid(self.conv_depth(feat)) * self.max_depth.

In contrast, we directly regress the predictions as

output = self.relu(self.conv_depth(feat)) + self.min_depth,

since the scale_up in depthformer is set to False.

I conduct several experiments and find that there will be no convergence problem if we set scale_up = True in depthformer. In our paper, we write "directly regress", so I keep the alignment of the implementation and the paper. May I will simply set the scale_up = True or add the warmup stage in the future, but the performance is on par in these settings.

@ashutosh1807
Copy link
Author

Okay, thanks. I will close this now.

zhyever added a commit that referenced this issue Jun 5, 2022
Add a simple warmup strategy for sigloss as discussed in Issue #20

Enhance DPT and fix bugs reported in Issue #23

Fix typos in docs and add several introductions
zhyever added a commit that referenced this issue Jun 5, 2022
Add a simple warmup strategy for sigloss as discussed in Issue #20

Enhance DPT and fix bugs reported in Issue #23

Fix typos in docs and add several introductions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants