Adaptive loss weight #884
Unanswered
chang-change
asked this question in
Q&A
Replies: 2 comments 4 replies
-
|
You need to modify the source code which is very easy thanks to @lululxvi 's coding style. Download this project. This is the function which you are going to start with. Please check this if-else condition for you backend. Here I assume you are using PyTorch. So, you need to add your code here for a PyTorch backend. I am not super genius in coding. Somebody may tell you a better way to do this. |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
If you don't want to re-compile, you can implement a callback to update the weights. The implementation is backend dependent. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
I want to use the adaptive loss weight during the neural network training according to the method showed by the following picture.

My code is following:
However, the neural network need to recompile at each update loss weight. It spends a lot of time. Is there any way to do this with just one compile? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions