[Fix] Use local ATTENTION registery to avoid conflict with other repo. (#375)
parent
0f4cae4d3f
commit
33a4c0fe9f
|
@ -1,4 +1,5 @@
|
|||
from mmcv.cnn import MODELS as MMCV_MODELS
|
||||
from mmcv.cnn.bricks.registry import ATTENTION as MMCV_ATTENTION
|
||||
from mmcv.utils import Registry
|
||||
|
||||
MODELS = Registry('models', parent=MMCV_MODELS)
|
||||
|
@ -9,6 +10,8 @@ HEADS = MODELS
|
|||
LOSSES = MODELS
|
||||
CLASSIFIERS = MODELS
|
||||
|
||||
ATTENTION = Registry('attention', parent=MMCV_ATTENTION)
|
||||
|
||||
|
||||
def build_backbone(cfg):
|
||||
"""Build backbone."""
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import torch
|
||||
import torch.nn as nn
|
||||
import torch.nn.functional as F
|
||||
from mmcv.cnn.bricks.registry import ATTENTION
|
||||
from mmcv.cnn.bricks.transformer import build_dropout
|
||||
from mmcv.cnn.utils.weight_init import trunc_normal_
|
||||
from mmcv.runner.base_module import BaseModule
|
||||
|
||||
from ..builder import ATTENTION
|
||||
from .helpers import to_2tuple
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue