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
Add loss evaluator #678
Add loss evaluator #678
Conversation
mmdet/models/bbox_heads/bbox_head.py
Outdated
@@ -2,8 +2,8 @@ | |||
import torch.nn as nn | |||
import torch.nn.functional as F | |||
|
|||
from mmdet.core import (delta2bbox, multiclass_nms, bbox_target, | |||
weighted_cross_entropy, weighted_smoothl1, accuracy) | |||
from mmdet.core import (delta2bbox, multiclass_nms, bbox_target, accuracy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The brackets are unnecessary in a single line.
@@ -63,7 +63,7 @@ def __init__(self, | |||
# add reg specific branch | |||
self.reg_convs, self.reg_fcs, self.reg_last_dim = \ | |||
self._add_conv_fc_branch( | |||
self.num_reg_convs, self.num_reg_fcs, self.shared_out_channels) | |||
self.num_reg_convs, self.num_reg_fcs, self.shared_out_channels) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems weird.
mmdet/models/losses/focal_loss.py
Outdated
|
||
|
||
@LOSSES.register_module | ||
class FocalLoss(CrossEntropyLoss): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FocalLoss
may directly inherit from nn.Module
.
mmdet/models/losses/focal_loss.py
Outdated
*args, | ||
**kwargs) | ||
else: | ||
raise NotImplementedError() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NotImplementedError
does not need the parenthesis.
* Fix license in setup.py * Add code for loss evaluator * Configs support loss evaluator * Fix a little bug * Fix flake8 * return revised bbox to reg * return revised bbox to reg * revision according to comments * fix flake8
No description provided.