MCPcopy Create free account
hub / github.com/BIT-MJY/CVTNet / __init__

Method __init__

modules/cvtnet.py:98–105  ·  view source on GitHub ↗
(self, d_model, heads, dropout=0.1)

Source from the content-addressed store, hash-verified

96
97class EncoderLayer(nn.Module):
98 def __init__(self, d_model, heads, dropout=0.1):
99 super().__init__()
100 self.norm_1 = Norm(d_model)
101 self.norm_2 = Norm(d_model)
102 self.attn = MultiHeadAttention(heads, d_model, dropout=dropout)
103 self.ff = FeedForward(d_model, dropout=dropout)
104 self.dropout_1 = nn.Dropout(dropout)
105 self.dropout_2 = nn.Dropout(dropout)
106
107 def forward(self, x, mask):
108 x2 = self.norm_1(x)

Callers

nothing calls this directly

Calls 4

NormClass · 0.85
MultiHeadAttentionClass · 0.85
FeedForwardClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected