Skip to content

Commit

Permalink
Merge pull request #21 from opensourcedot/wxs_1218
Browse files Browse the repository at this point in the history
change pgnet model head
  • Loading branch information
jiahaochen666 authored Dec 19, 2024
2 parents 5785603 + cff7e55 commit 38292a1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions mindocr/models/heads/e2e_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ class PGNetHead(nn.Cell):
Returns:
Tensor: The output predict of f_score, f_boder, f_char, f_direction.
"""
def __init__(self, in_channels: int, **kwargs):
def __init__(self, in_channels: int, character_length: int = 37, **kwargs):
super().__init__()
character_dict_path = "./mindocr/utils/dict/ic15_dict.txt"
with open(character_dict_path, "rb") as fin:
lines = fin.readlines()
character_length = len(lines) + 1

self.relu = nn.ReLU()

self.conv_f_score1 = ConvNormLayer(in_channels, 64, kernel_size=1, stride=1, act=True)
Expand Down

0 comments on commit 38292a1

Please sign in to comment.