Skip to content
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

Merged
merged 9 commits into from May 21, 2019
Merged

Add loss evaluator #678

merged 9 commits into from May 21, 2019

Conversation

OceanPang
Copy link
Collaborator

No description provided.

@OceanPang OceanPang requested a review from hellock May 21, 2019 08:48
@@ -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)
Copy link
Member

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems weird.



@LOSSES.register_module
class FocalLoss(CrossEntropyLoss):
Copy link
Member

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.

*args,
**kwargs)
else:
raise NotImplementedError()
Copy link
Member

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.

@hellock hellock merged commit 57d3459 into open-mmlab:master May 21, 2019
@OceanPang OceanPang deleted the libra branch May 22, 2019 02:05
@hellock hellock mentioned this pull request May 23, 2019
JegernOUTT pushed a commit to JegernOUTT/mmdetection that referenced this pull request Nov 23, 2019
* 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
FANGAreNotGnu pushed a commit to FANGAreNotGnu/mmdetection that referenced this pull request Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants