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 act_cfg #2239

Merged
merged 5 commits into from
Mar 12, 2020
Merged

add act_cfg #2239

merged 5 commits into from
Mar 12, 2020

Conversation

xvjiarui
Copy link
Collaborator

This added config for activation so that user could use activation like relu and leaky_relu.

@xvjiarui xvjiarui requested a review from hellock March 11, 2020 13:48
mmdet/models/utils/activation.py Show resolved Hide resolved
mmdet/models/utils/activation.py Show resolved Hide resolved
mmdet/models/utils/conv_module.py Outdated Show resolved Hide resolved
@xvjiarui xvjiarui requested a review from hellock March 12, 2020 01:16
@@ -41,7 +41,7 @@ def __init__(self,
out_channels,
kernel_size=1,
bias=False,
activation=None,
act_cfg=None,
conv_cfg=conv_cfg,
norm_cfg=norm_cfg)
Copy link
Member

Choose a reason for hiding this comment

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

We may follow the argument order: conv_cfg, norm_cfg, act_cfg.

mmdet/models/necks/fpn_carafe.py Show resolved Hide resolved
@@ -60,7 +61,7 @@ class ConvModule(nn.Module):
False.
conv_cfg (dict): Config dict for convolution layer.
norm_cfg (dict): Config dict for normalization layer.
activation (str or None): Activation type, "ReLU" by default.
act_cfg (str or None): Activation type, "ReLU" by default.
Copy link
Member

Choose a reason for hiding this comment

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

It is no longer a str.

import torch.nn as nn

activation_cfg = {
# format: layer_type: (abbreviation, module)
Copy link
Member

Choose a reason for hiding this comment

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

This comment is incorrect.

@hellock hellock merged commit 050614a into open-mmlab:master Mar 12, 2020
ioir123ju pushed a commit to ioir123ju/mmdetection that referenced this pull request Mar 30, 2020
* add act_cfg

* add more act_cfg options

* delel GELU

* reorder args, save act_cfg, update doc

* update doc
mike112223 pushed a commit to mike112223/mmdetection that referenced this pull request Aug 25, 2020
* add act_cfg

* add more act_cfg options

* delel GELU

* reorder args, save act_cfg, update doc

* update doc
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.

2 participants