Can i use two kinds of loss_layer such as multibox_loss_layer and sum_cost ?
Thank you for contributing to PaddlePaddle. Submitting an issue is a great help for us. Both Chinese and English issues are welcome.
It's hard to solve a problem when important details are missing. Before submitting the issue, look over the following criteria before handing your request in.
- [ ] Was there a similar issue submitted or resolved before ? You could search issue in the github.
- [ ] Did you retrieve your issue from widespread search engines ?
- [ ] Is my description of the issue clear enough to reproduce this problem?
- If some errors occurred, we need details about
how do you run your code?,what system do you use?,Are you using GPU or not?, etc. - If you use an recording asciinema to show what you are doing to make it happen, that's awesome! We could help you solve the problem more quickly.
- If some errors occurred, we need details about
- [ ] Is my description of the issue use the github markdown correctly?
- Please use the proper markdown syntaxes for styling all forms of writing, e.g, source code, error information, etc.
- Check out this page to find out much more about markdown.
can you give some more information about your question?
If i use two kinds of loss_layer, total loss is sum of them?(or add in proportion) And gradients is how to update ?
two branches and two tasks and two losses
are you using Python V2 API?
v1
paddle python v2 can support?
If Python V2 API support the demand, i can update paddle to v2.
https://github.com/PaddlePaddle/Paddle/issues/2913#issuecomment-315690936
当指定多个损失函数时,日志中的输出是把多个损失函数求和。https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/trainer/TrainerInternal.cpp#L137 cost = Argument::sum(*outArgs); 上面代码中 outArgs 就是配置中指定的一个或者多个损失函数,Paddle 目前不会分别输出每个损失函数的值。
如果使用fluid的话,多个loss可以使用add operator进行组合
Closing due to low activity. Feel free to reopen it.
@peterzhang2029 can you reopen this issue? I want to know how to achieve it.