MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / __init__

Method __init__

detrsmpl/models/utils/transformer.py:81–101  ·  view source on GitHub ↗
(self,
                 attn_cfgs,
                 feedforward_channels,
                 ffn_dropout=0.0,
                 operation_order=None,
                 act_cfg=dict(type='ReLU', inplace=True),
                 norm_cfg=dict(type='LN'),
                 ffn_num_fcs=2,
                 **kwargs)

Source from the content-addressed store, hash-verified

79 Default:2.
80 """
81 def __init__(self,
82 attn_cfgs,
83 feedforward_channels,
84 ffn_dropout=0.0,
85 operation_order=None,
86 act_cfg=dict(type='ReLU', inplace=True),
87 norm_cfg=dict(type='LN'),
88 ffn_num_fcs=2,
89 **kwargs):
90 super(DetrTransformerDecoderLayer,
91 self).__init__(attn_cfgs=attn_cfgs,
92 feedforward_channels=feedforward_channels,
93 ffn_dropout=ffn_dropout,
94 operation_order=operation_order,
95 act_cfg=act_cfg,
96 norm_cfg=norm_cfg,
97 ffn_num_fcs=ffn_num_fcs,
98 **kwargs)
99 assert len(operation_order) == 6
100 assert set(operation_order) == set(
101 ['self_attn', 'norm', 'cross_attn', 'ffn'])
102
103
104@TRANSFORMER_LAYER_SEQUENCE.register_module()

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected