MCPcopy Create free account
hub / github.com/BorealisAI/scaleformer / __init__

Method __init__

layers/Transformer_EncDec.py:75–79  ·  view source on GitHub ↗
(self, attn_layers, conv_layers=None, norm_layer=None)

Source from the content-addressed store, hash-verified

73
74class Encoder(nn.Module):
75 def __init__(self, attn_layers, conv_layers=None, norm_layer=None):
76 super(Encoder, self).__init__()
77 self.attn_layers = nn.ModuleList(attn_layers)
78 self.conv_layers = nn.ModuleList(conv_layers) if conv_layers is not None else None
79 self.norm = norm_layer
80
81 def forward(self, x, attn_mask=None):
82 # x [B, L, D]

Callers 4

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected