MCPcopy Create free account
hub / github.com/Topdu/OpenOCR / __init__

Method __init__

openrec/modeling/decoders/cdistnet_decoder.py:44–56  ·  view source on GitHub ↗
(
        self,
        d_model=512,
    )

Source from the content-addressed store, hash-verified

42class POS_Pre(nn.Module):
43
44 def __init__(
45 self,
46 d_model=512,
47 ):
48 super(POS_Pre, self).__init__()
49 self.pos_encoding = PositionalEncoding(
50 dropout=0.1,
51 dim=d_model,
52 )
53 self.linear1 = nn.Linear(d_model, d_model)
54 self.linear2 = nn.Linear(d_model, d_model)
55
56 self.norm2 = nn.LayerNorm(d_model)
57
58 def forward(self, tgt):
59 pos = tgt.new_zeros(*tgt.shape)

Callers

nothing calls this directly

Calls 2

PositionalEncodingClass · 0.90
__init__Method · 0.45

Tested by

no test coverage detected