MCPcopy
hub / github.com/JaidedAI/EasyOCR / double_conv

Class double_conv

easyocr/craft.py:13–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11from .model.modules import vgg16_bn, init_weights
12
13class double_conv(nn.Module):
14 def __init__(self, in_ch, mid_ch, out_ch):
15 super(double_conv, self).__init__()
16 self.conv = nn.Sequential(
17 nn.Conv2d(in_ch + mid_ch, mid_ch, kernel_size=1),
18 nn.BatchNorm2d(mid_ch),
19 nn.ReLU(inplace=True),
20 nn.Conv2d(mid_ch, out_ch, kernel_size=3, padding=1),
21 nn.BatchNorm2d(out_ch),
22 nn.ReLU(inplace=True)
23 )
24
25 def forward(self, x):
26 x = self.conv(x)
27 return x
28
29
30class CRAFT(nn.Module):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…