Comments (7)
No, unfortunately.
from polylanenet.
Never mind. I knew the reasons.
Now the total loss reached around 4~5.
Anyway, Can you explain your code as below?
def forward(self, x, epoch=None, **kwargs): output, extra_outputs = self.model(x, **kwargs) for i in range(len(self.curriculum_steps)): if epoch is not None and epoch < self.curriculum_steps[i]: output[-len(self.curriculum_steps) + i] = 0 return output, extra_outputs
Particularly, why we need to zero one feature before feeding to loss function as below?
output[-len(self.curriculum_steps) + i] = 0
from polylanenet.
That's just a leftover from some experiments I did with curriculum learning. That line has no effect with the default config files used, you can ignore it (or remove).
from polylanenet.
After a few trials, I could not get lower loss value as your logs. I have reviewed your code many times but could not get it right.
Here is your loss calculation:
# applying weights to partial losses
poly_loss = poly_loss * poly_weight
lower_loss = lower_loss * lower_weight
upper_loss = upper_loss * upper_weight
cls_loss = cls_loss * cls_weight
conf_loss = bce(pred_confs, target_confs) * conf_weight
loss = conf_loss + lower_loss + upper_loss + poly_loss + cls_loss
return loss, {
'conf': conf_loss,
'lower': lower_loss,
'upper': upper_loss,
'poly': poly_loss,
'cls_loss': cls_loss
}
Here is your loss parameters:
loss_parameters:
conf_weight: 1
lower_weight: 1
upper_weight: 1
cls_weight: 0
poly_weight: 300
Here is your loss calculated values:
[2020-04-03 21:41:01,371] [INFO] Epoch [1/2695], Step [1/227], Loss: 105.9413 (upper: 0.8436, lower: 0.1043, poly: 104.3011, conf: 0.6923), s/iter: 0.5786, lr: 3.0e-04
[2020-04-03 21:41:01,776] [INFO] Epoch [1/2695], Step [2/227], Loss: 83.7656 (upper: 0.7416, lower: 0.0899, poly: 60.0729, conf: 0.6855), s/iter: 0.4678, lr: 3.0e-04
[2020-04-03 21:41:02,159] [INFO] Epoch [1/2695], Step [3/227], Loss: 68.2684 (upper: 0.6549, lower: 0.0667, poly: 35.8984, conf: 0.6538), s/iter: 0.4277, lr: 3.0e-04
[2020-04-03 21:41:02,516] [INFO] Epoch [1/2695], Step [4/227], Loss: 57.8521 (upper: 0.5872, lower: 0.0476, poly: 25.3292, conf: 0.6394), s/iter: 0.4079, lr: 3.0e-04
with poly_weight: 300
, how did you calculate Loss as above? Should it as poly_weight: 1
?
from polylanenet.
That poly
loss value being printed is after multiplying it by poly_weight
. If you sum all loss components (upper + lower + poly + conf
) you'll see that, for the first line, it equals 105.9413, as printed. That doesn't mean that the poly_weight
equals 1, it's just that the printed value is post-multiplication.
from polylanenet.
My bad. I have noticed the same thing after posting the comment.
from polylanenet.
No problem :) Feel free to ask any more questions you have.
from polylanenet.
Related Issues (20)
- A question about the maximum performance HOT 2
- A problem about sharing the top-y (h) in lib/models.py line 103 HOT 3
- The problem of predicting performance HOT 1
- Question about sharing the horizon HOT 4
- The question about LPD HOT 2
- A problem about the "curriculum_steps" in lib/models.py line 65 HOT 1
- A consultation on the GPU number HOT 3
- problem about speed HOT 2
- Check param count HOT 2
- How to train my own dataset? HOT 3
- What if we do not predict s and h HOT 1
- h_samples HOT 5
- poly_weight HOT 2
- Have you ever done experiments on CULane datasets? HOT 1
- Confidence Scores HOT 3
- from pt convert ONNX model HOT 4
- IndexError
- About testing on other Dataset HOT 1
- change you requirements version
- error encountered while testing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polylanenet.