-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
add act_cfg #2239
Conversation
@@ -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) |
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.
We may follow the argument order: conv_cfg, norm_cfg, act_cfg.
mmdet/models/utils/conv_module.py
Outdated
@@ -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. |
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.
It is no longer a str.
mmdet/models/utils/activation.py
Outdated
import torch.nn as nn | ||
|
||
activation_cfg = { | ||
# format: layer_type: (abbreviation, module) |
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 comment is incorrect.
* add act_cfg * add more act_cfg options * delel GELU * reorder args, save act_cfg, update doc * update doc
* add act_cfg * add more act_cfg options * delel GELU * reorder args, save act_cfg, update doc * update doc
This added config for activation so that user could use activation like
relu
andleaky_relu
.