MCPcopy Create free account
hub / github.com/Anoise/WTFlib / __init__

Method __init__

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

Source from the content-addressed store, hash-verified

52
53class Encoder(nn.Module):
54 def __init__(self, attn_layers, conv_layers=None, norm_layer=None):
55 super(Encoder, self).__init__()
56 self.attn_layers = nn.ModuleList(attn_layers)
57 self.conv_layers = nn.ModuleList(conv_layers) if conv_layers is not None else None
58 self.norm = norm_layer
59
60 def forward(self, x, attn_mask=None):
61 # 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