MCPcopy Create free account
hub / github.com/649453932/Chinese-Text-Classification-Pytorch / __init__

Method __init__

models/Transformer.py:77–80  ·  view source on GitHub ↗
(self, dim_model, num_head, hidden, dropout)

Source from the content-addressed store, hash-verified

75
76class Encoder(nn.Module):
77 def __init__(self, dim_model, num_head, hidden, dropout):
78 super(Encoder, self).__init__()
79 self.attention = Multi_Head_Attention(dim_model, num_head, dropout)
80 self.feed_forward = Position_wise_Feed_Forward(dim_model, hidden, dropout)
81
82 def forward(self, x):
83 out = self.attention(x)

Callers

nothing calls this directly

Calls 3

__init__Method · 0.45

Tested by

no test coverage detected