Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove redundant self.init_cfg
Browse files Browse the repository at this point in the history
zhangshilong committed Apr 16, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent ae41150 commit 46c4e05
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions mmcv/cnn/bricks/transformer.py
Original file line number Diff line number Diff line change
@@ -61,7 +61,6 @@ def __init__(self,
self.attn = nn.MultiheadAttention(embed_dims, num_heads, dropout,
**kwargs)
self.dropout = nn.Dropout(dropout)
self.init_cfg = init_cfg

def forward(self,
query,
@@ -171,7 +170,6 @@ def __init__(self,
self.num_fcs = num_fcs
self.act_cfg = act_cfg
self.dropout = dropout
self.init_cfg = init_cfg
self.activate = build_activation_layer(act_cfg)

layers = []
@@ -422,7 +420,6 @@ def __init__(self, transformerlayers=None, num_layers=None, init_cfg=None):
else:
assert isinstance(transformerlayers, list) and \
len(transformerlayers) == num_layers
self.init_cfg = init_cfg
self.num_layers = num_layers
operation_order = transformerlayers[0]['operation_order']
self.pre_norm = operation_order[0] == 'norm'

0 comments on commit 46c4e05

Please sign in to comment.