Skip to content

Commit

Permalink
补充num_classes注释说明 (#10073)
Browse files Browse the repository at this point in the history
ser_vi_layoutxlm_xfund_zh.yml中的Architecture.Backbone.num_classes所赋值会设置给Loss.num_classes,
由于采用BIO标注,假设字典中包含n个字段(包含other)时,则类别数为2n-1;假设字典中包含n个字段(不含other)时,则类别数为2n+1。
  • Loading branch information
tanjh authored and shiyutang committed Oct 16, 2023
1 parent 77fb150 commit 5ae14fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/doc_ch/kie.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Architecture:
name: LayoutXLMForSer
pretrained: True
mode: vi
# 假设字典中包含n个字段(包含other),由于采用BIO标注,则类别数为2n-1
# 由于采用BIO标注,假设字典中包含n个字段(包含other)时,则类别数为2n-1; 假设字典中包含n个字段(不含other)时,则类别数为2n+1。否则在train过程会报:IndexError: (OutOfRange) label value should less than the shape of axis dimension 。
num_classes: &num_classes 7

PostProcess:
Expand Down

0 comments on commit 5ae14fb

Please sign in to comment.