-
Notifications
You must be signed in to change notification settings - Fork 174
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
Weighted loss #94
Comments
You are right, that would be a nice enhancement. It would be quite easy if we changed the interface of |
Yep, I'm adding x argument to all loss() functions all over the code right now. |
Cool. Do you think it is feasible to do this in a backward-compatible way? |
I don't know how to add weights to all models without going through all the code, so I'll probably only add support for weights to EdgeFeatureGraphCRF (since I'm currently only interested in it). I'm thinking to just check the length of x tuple to decide if the weights are given and the loss should be weighted. |
I would rather create a new model that inherits from |
+1 for boolean parameter that can be checked if loss is weighted.
|
Ideally, this should be implemented in a way that also includes the |
Yeah, class_weight seems redundant when nodes can have weights, but still more convenient. EdgeFeatureGraphCRF could translate class weights to node weights so that lower levels don't have know about class weights. |
exactly :) |
It would be nice to be able to pass node weights for Hamming loss function, i.e. make some labels more important than the others. For example, if we are labeling superpixels of an image instead of pixels, we want to minimize the number of wrong pixels, not superpixels.
The text was updated successfully, but these errors were encountered: