MCPcopy
hub / github.com/PaddlePaddle/PaddleOCR / __init__

Method __init__

ppocr/modeling/transforms/tsrn.py:170–177  ·  view source on GitHub ↗
(self, in_channels, up_scale)

Source from the content-addressed store, hash-verified

168
169class UpsampleBLock(nn.Layer):
170 def __init__(self, in_channels, up_scale):
171 super(UpsampleBLock, self).__init__()
172 self.conv = nn.Conv2D(
173 in_channels, in_channels * up_scale**2, kernel_size=3, padding=1
174 )
175
176 self.pixel_shuffle = nn.PixelShuffle(up_scale)
177 self.prelu = mish()
178
179 def forward(self, x):
180 x = self.conv(x)

Callers

nothing calls this directly

Calls 2

mishClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected